claude-code - 💡(How to fix) Fix [Bug] Auto-mode yields to user after Agent tool returns instead of continuing pipeline [3 comments, 3 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#54879Fetched 2026-05-01 05:52:01
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
labeled ×4commented ×3mentioned ×1subscribed ×1

Error Message

[ { "error": "Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-30T02:03:47.764Z" }, { "error": "MaxFileReadTokenExceededError: File content (27532 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Km7 (/$bunfs/root/src/entrypoints/cli.js:4852:12789)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-30T02:50:21.614Z" }, { "error": "Error: EISDIR: illegal operation on a directory, read '/repos/<repo>/<module-dir>/test/<fixture-a>'\n at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-30T02:50:44.245Z" }, { "error": "Error: EISDIR: illegal operation on a directory, read '/repos/<repo>/<module-dir>/test/<fixture-b>'\n at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-30T02:50:44.432Z" } ]

Fix Action

Fix / Workaround

Repro: Multi-agent orchestration with auto mode active (permission-mode: auto). Skill defines a deterministic N-step pipeline (planner → builder → tester → review → judge → shipper). Each step dispatches via the Agent tool. After the Agent tool returns with an explicit JSON success signal, the orchestrator yields to user instead of dispatching the next step.

Quantitative evidence (single session, Opus 4.7 [1M], xhigh):

  • 8 manual user nudges ("status?") to advance the pipeline
  • 7/8 nudges came directly after Agent tool returns
  • 15 total Agent dispatches; ~47% required user nudge to continue
  • 3 auto-mode system-reminders ("Execute autonomously, minimize interruptions") fired mid-session and did NOT change behavior
  • 3 task-tool reminders also fired; orchestrator never used TaskCreate/TaskUpdate
  • 29% of yielded turns ended with permission-seeking prose ("Want me to...?")

Hypothesis: model treats long-running tool result (Agent dispatches commonly run 100-280s) as a strong "natural turn end" signal that overrides auto-mode and explicit pipeline-state context in the skill body. The system-reminder mechanism for auto mode is too soft to override the trained "tool result = end turn" instinct.

Code Example

[
    {
      "error": "Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)",
      "timestamp": "2026-04-30T02:03:47.764Z"
    },
    {
      "error": "MaxFileReadTokenExceededError: File content (27532 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the
   file, or search for specific content instead of reading the whole file.\n    at Km7 (/$bunfs/root/src/entrypoints/cli.js:4852:12789)\n    at processTicksAndRejections
  (native:7:39)",
      "timestamp": "2026-04-30T02:50:21.614Z"
    },
    {
      "error": "Error: EISDIR: illegal operation on a directory, read '~/repos/<repo>/<module-dir>/test/<fixture-a>'\n    at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n
    at processTicksAndRejections (native:7:39)",
      "timestamp": "2026-04-30T02:50:44.245Z"
    },
    {
      "error": "Error: EISDIR: illegal operation on a directory, read '~/repos/<repo>/<module-dir>/test/<fixture-b>'\n    at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n
    at processTicksAndRejections (native:7:39)",
      "timestamp": "2026-04-30T02:50:44.432Z"
    }
  ]
RAW_BUFFERClick to expand / collapse

Bug Description Bug: Auto-mode + subagent (Agent tool) chains yield to user instead of continuing pipeline.

Repro: Multi-agent orchestration with auto mode active (permission-mode: auto). Skill defines a deterministic N-step pipeline (planner → builder → tester → review → judge → shipper). Each step dispatches via the Agent tool. After the Agent tool returns with an explicit JSON success signal, the orchestrator yields to user instead of dispatching the next step.

Quantitative evidence (single session, Opus 4.7 [1M], xhigh):

  • 8 manual user nudges ("status?") to advance the pipeline
  • 7/8 nudges came directly after Agent tool returns
  • 15 total Agent dispatches; ~47% required user nudge to continue
  • 3 auto-mode system-reminders ("Execute autonomously, minimize interruptions") fired mid-session and did NOT change behavior
  • 3 task-tool reminders also fired; orchestrator never used TaskCreate/TaskUpdate
  • 29% of yielded turns ended with permission-seeking prose ("Want me to...?")

Hypothesis: model treats long-running tool result (Agent dispatches commonly run 100-280s) as a strong "natural turn end" signal that overrides auto-mode and explicit pipeline-state context in the skill body. The system-reminder mechanism for auto mode is too soft to override the trained "tool result = end turn" instinct.

Impact: defeats the value of multi-agent orchestration skills. User has to be the human pacemaker for an autonomous workflow they explicitly opted into.

Severity: medium. Not a hang — pipeline progresses correctly when nudged. But it makes long agentic flows (the actual selling point) feel half-broken.

Suggested fixes:

  • Treat Agent tool returns as a strong "continue work" signal under auto mode
  • Make auto-mode reminders harder to ignore (system-prompt-level, not just system-reminder injection)
  • Detect deterministic-pipeline patterns in the active skill body and bias toward continuation when next step is enumerated

Session JSONL bundle available on request — ~3.9MB main + 17 subagent transcripts. Has reproducible nudge pattern with timestamps.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.123
  • Feedback ID: bde81f82-045b-488a-b287-842f3f200210

Errors

[
  {
    "error": "Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-30T02:03:47.764Z"
  },
  {
    "error": "MaxFileReadTokenExceededError: File content (27532 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the
 file, or search for specific content instead of reading the whole file.\n    at Km7 (/$bunfs/root/src/entrypoints/cli.js:4852:12789)\n    at processTicksAndRejections
(native:7:39)",
    "timestamp": "2026-04-30T02:50:21.614Z"
  },
  {
    "error": "Error: EISDIR: illegal operation on a directory, read '~/repos/<repo>/<module-dir>/test/<fixture-a>'\n    at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n
  at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-30T02:50:44.245Z"
  },
  {
    "error": "Error: EISDIR: illegal operation on a directory, read '~/repos/<repo>/<module-dir>/test/<fixture-b>'\n    at GAH (/$bunfs/root/src/entrypoints/cli.js:1708:144)\n
  at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-30T02:50:44.432Z"
  }
]

extent analysis

TL;DR

Treat Agent tool returns as a strong "continue work" signal under auto mode to resolve the issue of the pipeline yielding to the user instead of continuing.

Guidance

  • Review the pipeline implementation to ensure that the Agent tool returns are properly handled and that the pipeline is configured to continue execution after each step.
  • Investigate the system-reminder mechanism for auto mode and consider making it more prominent, such as elevating it to a system-prompt level, to override the trained "tool result = end turn" instinct.
  • Analyze the session JSONL bundle to identify patterns in the pipeline execution and determine if there are any specific conditions that trigger the pipeline to yield to the user.
  • Consider implementing a bias toward continuation when the next step is enumerated in the skill body to improve the pipeline's autonomy.

Example

No code snippet is provided as the issue description does not include specific code references.

Notes

The issue may be related to the model's interpretation of long-running tool results as a natural turn end signal, which overrides the auto-mode and pipeline-state context. The provided error logs do not seem to be directly related to the issue, but may indicate other problems in the system.

Recommendation

Apply a workaround by treating Agent tool returns as a strong "continue work" signal under auto mode, as this is the most direct approach to resolving the issue. This change can help improve the pipeline's autonomy and reduce the need for user intervention.

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 [Bug] Auto-mode yields to user after Agent tool returns instead of continuing pipeline [3 comments, 3 participants]