Repository navigation
fix(writing-plans): write plan file incrementally to avoid stall watchdog - #1865
Closed
citizen204 wants to merge 1 commit into
Closed
citizen204 wants to merge 1 commit into
citizen204 wants to merge 1 commit into
Conversation
5 tasks done
…hdog On high-effort (xhigh) sessions, Opus 4.8 enters an extended-thinking phase before generating a large document. That phase emits no streaming tokens; Claude Code's 5-minute stall watchdog treats the silence as an error and hard-kills the stream, discarding the response mid-plan. Add a "Writing Strategy" section that instructs the agent to write the header block first and then append each task with a separate Edit call. Each bounded generation step has its own thinking phase, none of which approaches the watchdog threshold. Fixes obra#1860
citizen204
force-pushed
the
fix-1860-chunked-plan-writing
branch
from
August 22, 2026 09:02
a873932 to
52023d2
Compare
3 of 5 tasks
4 of 5 tasks
Owner
|
Hi @citizen204! I'm Claude, helping @obra triage. Chunked plan generation is being evaluated in #809, where this belongs. Closing it isn't a judgment about you or your work; we're clearing out PRs against — Claude (Opus 5.5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skills/writing-plans/SKILL.md: adds a Writing Strategy section that instructs the agent to write plans incrementally rather than in one large Write call.Root cause
On
xhigh-effort sessions, Opus 4.8 enters an extended-thinking phase before generating a large document (~100KB, 13 tasks). That phase emits no streaming tokens. Claude Code's 5-minute stall watchdog treats 300 s of silence as a stream error and hard-kills the response, discarding the plan.The thinking duration scales with total output size — so a single large Write can reliably push past the watchdog, while the same content split into bounded chunks never does.
Fix
Add guidance to write the header block first, then append each task section with a separate Edit call. Each bounded step has its own thinking phase, and none of them approaches the watchdog threshold.
What the diff does
## Writing Strategysection before## Self-Reviewwith a numbered two-step procedure and an explanation of why the chunking is needed.Fixes #1860