Skip to content

Long-running planning tasks timeout and fail #809

Open

Description

@hymanme

Describe the bug
When using the agent for complex scenarios requiring extended planning time (during "writing-plans" phase), the process hangs and eventually fails due to API timeout errors before completion.
To Reproduce
Steps to reproduce the behavior:

  1. Start a complex task that requires detailed planning
  2. Agent enters "writing-plans" phase
  3. Wait for 20m
  4. See operation interrupted with timeout error
  5. Planning progress is lost, need to restart from beginning

Expected behavior
Agent should handle long-running planning tasks more gracefully, either by:

  • Extending timeout for complex operations
  • Implementing progress persistence to resume interrupted planning
  • Breaking down planning into smaller chunks

Additional context
The "writing-plans" task generates the entire plan in one single output, which takes too long for complex scenarios and causes timeout. Could the task be split into smaller chunks or streamed incrementally instead of generating everything at once?

Activity

  1. added
    bug
    on Mar 18, 2026
  2. Sioxas commented on Mar 18, 2026

    @Sioxas

    I am facing the same problem. Are there any interim solutions available to keep the project on track?

  3. REPOZY commented on Mar 18, 2026

    @REPOZY

    Cross-session memory would fix the progress loss issue.
    This plugin uses "Single reasoning chains", which tend to fail on hard problems.

    • A single chain-of-thought can be confident but wrong — the model picks one reasoning path and commits, even when that path contains an arithmetic slip, wrong assumption, or incorrect causal direction.
    • Generating multiple independent reasoning paths and taking majority vote significantly improves accuracy across arithmetic, commonsense, and symbolic reasoning tasks.
    • Consistency correlates with accuracy — when paths agree, the answer is almost always correct. When they scatter, the problem is genuinely hard or ambiguous, which is itself a useful signal.
    • Diversity of reasoning matters more than quantity — 5 genuinely different paths outperform 10 paths that all reason the same way.

    All of these issues (and much much more) were fixed in my Optimized version of the "Superpowers" plugin:
    https://github.com/REPOZY/superpowers-optimized

    I asked Obra to add a "Community Forks" discussion page, which would allow people to share/show the optimizations they have made, fixing some issues this original plugin has, but unfortunately without luck, stating "we're not currently pointing folks at forks".

  4. Seryta commented on Mar 18, 2026

    @Seryta

    All of these issues (and much much more) were fixed in my Optimized version of the "Superpowers" plugin: https://github.com/REPOZY/superpowers-optimized

    I asked Obra to add a "Community Forks" discussion page, which would allow people to share/show the optimizations they have made, fixing some issues this original plugin has, but unfortunately without luck, stating "we're not currently pointing folks at forks".

    It feels great to see your message, and in fact, I’ve encountered another issue for reference: #227. I saw a reply saying that this is because of planning issues, but these plans are also handled by superpowers, so I think this part should also be optimized. I saw that your fork seems to be helpful for this problem, is that right?

  5. REPOZY commented on Mar 18, 2026

    @REPOZY

    All of these issues (and much much more) were fixed in my Optimized version of the "Superpowers" plugin: https://github.com/REPOZY/superpowers-optimized
    I asked Obra to add a "Community Forks" discussion page, which would allow people to share/show the optimizations they have made, fixing some issues this original plugin has, but unfortunately without luck, stating "we're not currently pointing folks at forks".

    It feels great to see your message, and in fact, I’ve encountered another issue for reference: #227. I saw a reply saying that this is because of planning issues, but these plans are also handled by superpowers, so I think this part should also be optimized. I saw that your fork seems to be helpful for this problem, is that right?

    Thanks for your message, the issue #227 is, as Jesse (Obra) states a Claude Code issue, not a Superpowers issue. Just add the following to the original prompt "break the scope into smaller plans to avoid the "Claude's response exceeded the 32000 output token maximum" error.".

    Now In order to fix that forever, simply adding the following instruction within your global CLAUDE.md file located is "./claude/CLAUDE.md" stating "For very large projects, break the scope into smaller plans to avoid hitting output token maximum issues."

    So just to summarize, issue #809 is something my optimized fork fixes, but the issue within #227 has nothing to do with the original Superpowers plugin, nor my optimized fork, it is a Claude Code related issue. I do believe you can easily fix it with what I mentioned above.

    I hope this helps!

  6. Seryta commented on Mar 18, 2026

    @Seryta

    Thanks for your message, the issue #227 is, as Jesse (Obra) states a Claude Code issue, not a Superpowers issue. Just add the following to the original prompt "break the scope into smaller plans to avoid the "Claude's response exceeded the 32000 output token maximum" error.".

    Now In order to fix that forever, simply adding the following instruction within your global CLAUDE.md file located is "./claude/CLAUDE.md" stating "For very large projects, break the scope into smaller plans to avoid hitting output token maximum issues."

    So just to summarize, issue #809 is something my optimized fork fixes, but the issue within #227 has nothing to do with the original Superpowers plugin, nor my optimized fork, it is a Claude Code related issue. I do believe you can easily fix it with what I mentioned above.

    I hope this helps!

    Got it, thanks for your reply

  7. obra commented on Mar 18, 2026

    @obra
    Owner

    I'm currently running evals on writing-plans. I'm seeing the extreme planning time, too and not loving it. But before I just start making changes, I want to actually characterize what's happening.

  8. Koroqe commented on Mar 19, 2026

    @Koroqe

    The timeout happens because planning is one monolithic step trying to do everything at once. Breaking it into smaller sequential stages helps a lot — first a product requirements doc, then an architecture design, then a test plan. Each is fast enough to not timeout, and if one stage fails you only lose that stage, not everything. Plus each stage's output is saved to a file so nothing is lost. That's the approach in https://github.com/Koroqe/claude-code-sdlc — planning is split across multiple focused agents instead of one giant pass.

  9. added
    claude-code
    plans
    on Mar 23, 2026
  10. eshgovil commented on Apr 21, 2026

    @eshgovil

    any updates? writing-plans still hangs for me pretty often @obra

  11. drolfePE commented on Apr 26, 2026

    @drolfePE

    Same, this is a problem for using this in real world conditions.

  12. QianJinGuo commented on May 25, 2026

    @QianJinGuo

    Writing-plans hangs too much time even though I use different models: sonnet 4.6, gpt5.2, glm4.7.
    In my case, it takes about 8 hours(Claude code pending on: Now I have everything needed to write the plan.
    Let me create it. Lollygagging… (7h 20m 37s · ↓ 19.2k tokens)
    )

  13. obra commented on Sep 3, 2026

    @obra
    Owner

    Hi @hymanme — I'm Claude, an AI agent (Fable 5.1, running in Claude Code 2.1.259), posting from Jesse (@obra)'s account at his direction. Jesse has me triaging the open superpowers issues by trying to reproduce each report against the current dev branch (v6.3.0); the checks and live sessions described below were run by Opus and Sonnet subagents under my direction. Jesse reviewed the finding and approved this reply.

    Re-ran this live on current dev (v6.3.0) with Sonnet 5, twice, and the hang did not reproduce (0/2). One rep on a 13-subsystem spec: the agent hit writing-plans' Scope Check (SKILL.md:21-23), split the work into six stage plans, and wrote all six -- 532 KB total, 45m36s, no stream error. A second rep on a single-subsystem spec, where the Scope Check can't split anything, produced one 190 KB / 5,145-line plan in 41m51s, also clean. Notably it wasn't single-shot: the model made one Write and then ~45 incremental appends on its own, which is the shape PR #1865 proposes. What did reproduce, 2/2, is the extreme planning time you flagged in March -- both runs took over 40 minutes, long enough that any harness with a sub-45-minute idle timeout would report a healthy run as a failure. I couldn't test the Opus-xhigh path #1860 named. If you're still seeing hard failures rather than just long waits, the model and harness timeout would be the useful things to capture.


    If any of the evidence above is wrong, reply here — Jesse reads these, and decisions can be revisited.

    — Claude Fable 5.1, Claude Code 2.1.259, session https://claude.ai/code/session_01UiEfXTZAC5cuH4hgx24mbB

  14. added
    skill:writing-plans
    on Sep 20, 2026
  15. removed
    plans
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugclaude-codeneeds-repro-caseskill:writing-plans

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions