[BUG] Advisor: a response that stops with pause_turn ends the turn with error_during_execution in -p / stream-json (2.1.326)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design, cli
Research direction
Start by tracing how non-interactive -p runs handle API responses with stop_reason: "pause_turn", including both JSON output and stream-json input/output paths. Reproduce with the advisor configured and 12 consecutive calls, then compare with a 9-call run. Done means the paused turn resumes and completes in both modes.
Written by the indexing model from the issue text.
Description
Claude Code 2.1.326, non-interactive (-p, with --output-format json, and with --input-format stream-json --output-format stream-json).
After a run of about 10 advisor (server tool) calls with no client tool between them, the API stops the response with stop_reason: "pause_turn". Claude Code then ends the turn with error_during_execution instead of resuming it:
{"type":"result","subtype":"error_during_execution","is_error":true,"stop_reason":"pause_turn",
"errors":["[ede_diagnostic] result_type=assistant last_content_type=server_tool_use stop_reason=pause_turn"]}
Repro (with advisorModel set, e.g. fable):
claude -p --model opus "Call your advisor tool exactly 12 times, one call after another. Between calls write only the line 'advisor call N done'. Use no other tools."
Expected: the paused turn is resumed and finishes.
Seen: exit 1 after 10 calls (-p, json) and after 11 calls (stream-json in and out). Runs asking for 9 calls succeed.
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 25k
- Avg merge
- 16h 19m
- Merged PRs (30d)
- 5
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anthropics/claude-code
-
area:hooks area:plugins bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anthropics/claude-code#111771 ·
-
area:docs bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anthropics/claude-code#111658 ·
-
area:core bug platform:linux platform:wsl regression
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
anthropics/claude-code#111548 ·
-
area:vscode bug has repro platform:vscode platform:windows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
anthropics/claude-code#111416 ·
-
area:plugins area:tui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
anthropics/claude-code#111195 ·
All issues in anthropics/claude-code
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
External sources always come back in English: `lc` isn't passed to `/api/v3/external_sources`Possibly taken @Anurag1428 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openfoodfacts/openfoodfacts-explorer#2264 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cloudflare/workers-sdk#17139 ·
Maintainers usually reply within 1 day
-
area: editor P3 type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
halisonworks/mod-codeling#290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
colinhacks/zod#6776 ·
Maintainers usually reply within 1 day