Skip to content

Fix quick chat blank response when Claude hits max-turns limit#82

Merged
mcintyre94 merged 1 commit intomainfrom
test-claude-behavior-issue-3b71887e
Mar 15, 2026
Merged

Fix quick chat blank response when Claude hits max-turns limit#82
mcintyre94 merged 1 commit intomainfrom
test-claude-behavior-issue-3b71887e

Conversation

@mcintyre94
Copy link
Copy Markdown
Owner

Summary

  • When --max-turns is hit mid-tool-use, Claude emits a result event with subtype: "error_max_turns" and is_error: false — the old code only checked isError, so the user silently got a blank response with no error shown
  • Now also checks subtype and surfaces a specific message: "Claude hit the turn limit without responding — try a simpler question"
  • Bumps --max-turns from 3 to 5 so Claude has headroom for up to 4 read-only tool calls (Glob/Grep/Read) before responding — with 3, any question needing two reads before answering would hit the wall

Test plan

  • New unit tests cover error_max_turns with empty response (shows specific error) and non-empty response (no error, preserves partial answer)
  • Existing tests for isError: true and successful results still pass

🤖 Generated with Claude Code

When --max-turns is reached mid-tool-use, the result event has
subtype "error_max_turns" with is_error:false, causing the app to
silently show a blank response. Now checks the subtype field and
surfaces a user-friendly error message.

Also bumps --max-turns from 3 to 5 so Claude has room for up to 4
read-only tool calls (Glob/Grep/Read) before responding, reducing
how often the limit is hit in practice.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 15, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mcintyre94 mcintyre94 merged commit 3b4e7b0 into main Mar 15, 2026
2 checks passed
@mcintyre94 mcintyre94 deleted the test-claude-behavior-issue-3b71887e branch March 15, 2026 11:05
@mcintyre94 mcintyre94 restored the test-claude-behavior-issue-3b71887e branch March 15, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant