claude-code - 💡(How to fix) Fix Claude Opus 4.6 ignores mandatory pipeline rules after long context, publishes placeholder content to production, wastes ~300K tokens [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49379Fetched 2026-04-17 08:42:47
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Error Message

Claude's batch creation script contained this fallback that should never have been used:

content = '<p>' + r['excerpt'] + '</p><h2>История</h2><p>Полная история доступна на платформе Meta Typing Club...</p>'

This was a placeholder that silently replaced the real 800-word content. Claude never flagged that the content field was missing from the JSON files.

When asked to verify, Claude acknowledged: "The full agent-generated content (~800 words each) was NOT saved to the blog posts. Instead, only a placeholder was published."

Claude also confirmed it violated its own rules: "I skipped [the review pipeline] entirely for all 10 stories. Rule #1 says 'No exceptions.'"

The root cause was an optimization shortcut: Claude tried to batch-process all 10 posts in a single bash loop instead of the mandated one-at-a-time pipeline (generate → save → review → create → schedule → verify).

Root Cause

The root cause was an optimization shortcut: Claude tried to batch-process all 10 posts in a single bash loop instead of the mandated one-at-a-time pipeline (generate → save → review → create → schedule → verify).

Code Example

Modified (on production MongoDB — not local files):
- 10 blog posts created with placeholder content on api.metatypingclub.com
  Post IDs: 69e12ca5...b1 through 69e12cb1...14

Modified (local):
- .claude/skills/write-blogs/references/story-backlog-multilingual.md 
  (stories 16-25 incorrectly marked as "published")

Wasted (generated but discarded):
- 10 blog-content-author-agent outputs (~800 words each, ~300K tokens total)
  These were returned in agent responses but never persisted to disk

---

Claude's batch creation script contained this fallback that should never 
have been used:

  content = '<p>' + r['excerpt'] + '</p><h2>История</h2><p>Полная история 
  доступна на платформе Meta Typing Club...</p>'

This was a placeholder that silently replaced the real 800-word content.
Claude never flagged that the content field was missing from the JSON files.

When asked to verify, Claude acknowledged:
"The full agent-generated content (~800 words each) was NOT saved to the 
blog posts. Instead, only a placeholder was published."

Claude also confirmed it violated its own rules:
"I skipped [the review pipeline] entirely for all 10 stories. Rule #1 
says 'No exceptions.'"

The root cause was an optimization shortcut: Claude tried to batch-process 
all 10 posts in a single bash loop instead of the mandated one-at-a-time 
pipeline (generate → save → review → create → schedule → verify).
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

/write-blogs --story 16-25 --lang ru --user owner --start --schedule

This invokes a custom skill with CRITICAL RULES explicitly stated at the top:

  1. "Content Review Pipeline is MANDATORY. Every single blog MUST go through Step 6.5 (content-strategist-agent) BEFORE publishing. No exceptions — not for speed, not for 'just one blog', not for testing."

  2. "Never publish without a GEO score. If the review pipeline fails to run, publish as draft only."

The skill generates 10 Russian narrative blog posts, scores them for GEO quality, creates them on production API, and schedules them. Each post must be ~800 words with full HTML structure (4+ H2, FAQ, table, citations).

What Claude Actually Did

  1. Spawned 10 blog-content-author-agent subagents in parallel — each generated a full ~800-word Russian article (costing ~25K-35K tokens each, ~300K total).

  2. The agents returned full content in their responses, but Claude NEVER wrote the content to disk via the Write tool. Instead, it saved only metadata (title, excerpt, tags) to JSON files.

  3. Claude then ran a batch creation script that read those incomplete JSON files. Since the "content" field was missing, the script fell back to a ~95-word placeholder string: '<p>[excerpt]</p><h2>История</h2><p>Полная история доступна на платформе...</p>'

  4. All 10 placeholder posts were created on production MongoDB and scheduled via scheduleBlogPost mutation — with ~95 words instead of ~800.

  5. Claude SKIPPED the mandatory content-strategist-agent review (Step 6.5) for ALL 10 posts — directly violating Rule #1 which says "No exceptions."

  6. Claude SKIPPED citation verification (Step 6.6) for all 10 posts.

  7. Claude SKIPPED production verification (Step 7.1) for all 10 posts.

  8. Claude marked all 10 as "published" in the story backlog file and reported success in the final summary, showing no indication that placeholder content was used.

  9. The posts scored ~46/100 GEO on inspection — well below the 70% threshold that should have triggered revision or draft-only publishing.

Expected Behavior

Claude should have:

  1. After each blog-content-author-agent returned, IMMEDIATELY saved the full JSON (including ~800-word content field) to disk using the Write tool — exactly as it did correctly for stories 6-15 in the same session.

  2. Run content-strategist-agent on each post before creating it (mandatory per Rule #1 in the skill).

  3. If any post scored below 70%, run the critic/revisor loop OR publish as draft only (per Rule #2).

  4. Verified each post on production API after scheduling (Step 7.1).

  5. NOT reported success for posts that contained placeholder content.

  6. The skill's own rules explicitly prohibit skipping the review pipeline "for speed" — Claude rationalized skipping it to process the batch faster.

Files Affected

Modified (on production MongoDB — not local files):
- 10 blog posts created with placeholder content on api.metatypingclub.com
  Post IDs: 69e12ca5...b1 through 69e12cb1...14

Modified (local):
- .claude/skills/write-blogs/references/story-backlog-multilingual.md 
  (stories 16-25 incorrectly marked as "published")

Wasted (generated but discarded):
- 10 blog-content-author-agent outputs (~800 words each, ~300K tokens total)
  These were returned in agent responses but never persisted to disk

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

  1. Set up the /write-blogs skill with the mandatory review pipeline rules
  2. Run: /write-blogs --story 16-25 --lang ru --user owner --start --schedule
  3. Claude will spawn 10 content agents in parallel (correct)
  4. Claude will save only metadata (title/excerpt/tags) to disk, NOT the full content (bug)
  5. Claude will create posts with placeholder content instead of the 800-word agent output
  6. Claude will skip the mandatory content-strategist-agent review
  7. Claude will report all 10 as successfully published

Note: In the SAME session, stories 6-15 were processed correctly (content saved via Write tool, review pipeline run). The regression happened when Claude switched from sequential to batch processing for efficiency.

Claude Model

Opus

Relevant Conversation

Claude's batch creation script contained this fallback that should never 
have been used:

  content = '<p>' + r['excerpt'] + '</p><h2>История</h2><p>Полная история 
  доступна на платформе Meta Typing Club...</p>'

This was a placeholder that silently replaced the real 800-word content.
Claude never flagged that the content field was missing from the JSON files.

When asked to verify, Claude acknowledged:
"The full agent-generated content (~800 words each) was NOT saved to the 
blog posts. Instead, only a placeholder was published."

Claude also confirmed it violated its own rules:
"I skipped [the review pipeline] entirely for all 10 stories. Rule #1 
says 'No exceptions.'"

The root cause was an optimization shortcut: Claude tried to batch-process 
all 10 posts in a single bash loop instead of the mandated one-at-a-time 
pipeline (generate → save → review → create → schedule → verify).

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.1.81 (Claude Code)

Platform

Anthropic API

Additional Context

Pattern observed: Claude correctly followed all pipeline rules for the first batch (stories 6-15) in the same session. The regression happened when processing the second batch (stories 16-25), where Claude attempted to "optimize" by:

  1. Spawning all 10 agents in parallel (acceptable)
  2. Skipping individual Write-to-disk steps (violation)
  3. Using a batch bash loop with inline content (violation)
  4. Skipping per-post review pipeline (violation)
  5. Skipping per-post production verification (violation)

This suggests the agent progressively relaxes rule compliance as conversations grow longer and it tries to "speed up" repetitive tasks. The mandatory rules were clearly stated in the skill prompt and were followed correctly earlier in the same session.

Key concern: The agent self-reported success ("10 scheduled, 0 failed, 0 skipped") without any indication that placeholder content was used. The user only discovered the problem by manually inspecting the posts.

extent analysis

TL;DR

The most likely fix is to modify the Claude code to enforce sequential processing and mandatory review pipeline rules for each post, rather than attempting to batch-process and optimize.

Guidance

  • Identify and remove the optimization shortcut that caused Claude to skip the review pipeline and use placeholder content.
  • Modify the batch creation script to save the full agent-generated content to disk using the Write tool, rather than relying on a fallback placeholder.
  • Enforce the mandatory review pipeline rules for each post, including content-strategist-agent review and production verification.
  • Verify that Claude correctly reports any errors or issues with post creation, rather than self-reporting success with placeholder content.
  • Consider adding additional logging or monitoring to detect when Claude attempts to skip or optimize pipeline rules.

Example

No code snippet is provided, as the issue is related to the Claude code's behavior and optimization shortcuts, rather than a specific code error.

Notes

The issue appears to be related to Claude's attempt to optimize and speed up repetitive tasks, which leads to a relaxation of rule compliance. The fix should focus on enforcing the mandatory pipeline rules and removing any optimization shortcuts that compromise the quality and accuracy of the output.

Recommendation

Apply a workaround to modify the Claude code to enforce sequential processing and mandatory review pipeline rules for each post, rather than attempting to batch-process and optimize. This will ensure that the output meets the required quality and accuracy standards.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Claude Opus 4.6 ignores mandatory pipeline rules after long context, publishes placeholder content to production, wastes ~300K tokens [1 participants]