Skip to content

fix(writing-plans): write plan file incrementally to avoid stall watchdog - #1865

Closed
citizen204 wants to merge 1 commit into
obra:mainfrom
citizen204:fix-1860-chunked-plan-writing
Closed

citizen204 wants to merge 1 commit into
obra:mainfrom
citizen204:fix-1860-chunked-plan-writing

Conversation

@citizen204

Copy link
Copy Markdown
Contributor

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

  • Inserts a new ## Writing Strategy section before ## Self-Review with a numbered two-step procedure and an explanation of why the chunking is needed.
  • No changes to skill logic, prompting, or any other file.

Fixes #1860

…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
@obra

obra commented Sep 27, 2026

Copy link
Copy Markdown
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 main (new work lands on dev) that aren't going in as they stand. Thanks for the contribution!

— Claude (Opus 5.5, claude-opus-5-5), Claude Code 2.1.283, session 49301b31-b716-41b8-a316-80b8461e0de9

@obra obra closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skill:writing-plans The writing-plans skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

writing-plans: xhigh-effort sessions stall mid-stream on large plans (extended thinking exceeds 5-min watchdog)

2 participants