claude-code - 💡(How to fix) Fix Stray '>' character appears at prompt line after response completes (still occurring; refile of #34970) [1 comments, 2 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#48204Fetched 2026-04-15 06:30:14
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Refiling #34970 — the original was auto-closed by the stale bot, but this is still happening as of 2026-04-14.

Environment

  • OS: macOS (Darwin 25.3.0)
  • Terminal: iTerm2
  • Shell: zsh
  • Status line: enabled (bypass permissions on)
  • Voice: enabled
  • Hooks: Stop hook (session-summary.py, writes to stderr only)

Reproduction

  • Happens intermittently after responses complete
  • Not tied to specific response content or tool usage
  • The > is cosmetic only — typing clears it, input is unaffected
  • Observed across multiple sessions and multiple Claude Code versions since March

Expected

Prompt shows only with cursor.

Actual

Prompt occasionally shows ❯_> with a stray >.

Prior analysis (from #34970)

  • $PROMPT is %T: — no > character
  • Stop hooks write to stderr/files, not stdout
  • No custom keybindings or prompt config
  • Likely a TUI rendering artifact from ANSI escapes or status line updates

extent analysis

TL;DR

The issue can be mitigated by investigating and potentially adjusting the handling of ANSI escapes or status line updates in the terminal configuration.

Guidance

  • Review the iTerm2 terminal configuration for any custom settings that might interfere with ANSI escape sequences or status line updates.
  • Verify that the session-summary.py hook is not inadvertently printing any characters to stdout, despite being intended to write to stderr only.
  • Check for any updates to iTerm2 or zsh that may address issues related to ANSI escape rendering or status line updates.
  • Consider temporarily disabling the status line or voice features to isolate if either contributes to the issue.

Example

No specific code snippet can be provided without more details on the session-summary.py hook or the exact iTerm2 and zsh configurations.

Notes

The issue's intermittent nature and lack of clear correlation with specific actions or content make it challenging to pinpoint the exact cause without further debugging or logging information.

Recommendation

Apply workaround: Temporarily disable the status line or adjust ANSI escape handling in the terminal configuration to see if it mitigates the issue, as the root cause seems related to these aspects.

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 Stray '>' character appears at prompt line after response completes (still occurring; refile of #34970) [1 comments, 2 participants]