shannon icon indicating copy to clipboard operation
shannon copied to clipboard

resume later when reaching limits with Claude OAuth

Open resident-ngo opened this issue 11 months ago โ€ข 2 comments

Claude Pro has some aggressive limits that are easily hit. It seems that some modules like SSRF can detect that limits were hit:

โ  Running analysis...    โœ… Empty checkpoint created (no workspace changes)
    ๐ŸŽญ Assigned authz-vuln โ†’ playwright-agent5
[SSRF] Spending cap reached resets 6pm

    ๐Ÿ COMPLETED:
    โฑ๏ธ  Duration: 0.7s, Cost: $0.0000
โœ“ Analysis complete! (1 turns, 1.9s)

But then it tries to move forward - all the validations fail and final report is empty.

In other cases we can see no deliverables produced and it still tries to execute steps doomed to fail:

    ๐Ÿค– Turn 348 (Pre-recon agent):
    Now I'll synthesize all findings into the comprehensive security report. Based on the agent outputs, I have all the information needed. Let me create the complete CODE_ANALYSIS deliverable:

    ๐Ÿค– Turn 349 (Pre-recon agent):
    API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
    โš ๏ธ  API Error detected in assistant response: API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.

    ๐Ÿ COMPLETED:
    โฑ๏ธ  Duration: 1714.3s, Cost: $6.3090
  โš ๏ธ API Error detected in Pre-recon agent - will validate deliverables before failing
โœ“ Pre-recon analysis complete! (349 turns, 29m 5s)
    ๐Ÿ” Validating pre-recon agent output
    ๐Ÿ“‹ Using validator for agent: pre-recon
    ๐Ÿ“‚ Source directory: /app/repos/reponame
    โŒ Validation failed: Missing required deliverable files
โš ๏ธ Pre-recon agent completed but output validation failed
โš ๏ธ API Error detected with validation failure - treating as retryable
    ๐Ÿ”„ Rolling back workspace for validation failure
    โœ… Rollback completed - removed 1 contaminated changes:
       ?? deliverables/
    ๐Ÿ“ Creating checkpoint for Pre-recon agent (attempt 2)
    ๐Ÿงน Cleaning workspace for Pre-recon agent (retry cleanup)
    โœ… Workspace already clean (no changes to remove)
    โœ… Empty checkpoint created (no workspace changes)
    ๐ŸŽญ Assigned pre-recon โ†’ playwright-agent1

    ๐Ÿค– Turn 1 (Pre-recon agent):
    I'll begin the comprehensive security-focused code analysis of this application. Let me start by creating a task list and then launching the discovery agents.

To reproduce the issue you can use Claude OAuth token and use any huge repo like existing Wordpress installation with some plugins.

The desired behavior is to pause the work, wait for the time when limits are reset and continue, ideally retrying failed jobs.

P.S. Awesome product, thank you so much for making it available for free for small security initiative and individuals! Many organizations have Claude Pro subscription, but can't afford to pay 50$ per run. From other hand they are very patient, so it is ok for them to wait for 12-24 hours for analysis and tests to finish.

resident-ngo avatar Dec 22 '25 21:12 resident-ngo

Sorry for the late reply! And thanks for the kind words, that's what makes OSS work worthwhile. The "detect rate limit โ†’ wait for reset โ†’ resume" flow you're describing makes a lot of sense, especially for users on Claude Pro users who are happy to wait for limits to reset rather than burn through failed retries. Quick update: we recently landed a big refactor using Temporal for durable execution, which gives us the foundation to support something like this. Can't promise if or when we'll build it, but I've added it to the backlog. (Cc: @ajmallesh ) Thanks again for the detailed write-up!

keygraphVarun avatar Jan 18 '26 07:01 keygraphVarun

We've been substantial improvements in retries and checkpointing, etc. and have landed in durable exectuion via Temporal. The issues you've raised above should now be handled more gracefully. Thanks a lot for your feedback and it was impetus for us to get it done!

keygraphVarun avatar Mar 03 '26 03:03 keygraphVarun