You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(chat): show a stop in Claude Code as one quiet "Stopped" line, not as a message from the user - #4466
Claude Code records a stop (Esc) as a user entry, in the person's seat:
[Request interrupted by user for tool use], after the tool call whose prompt was refused;
[Request interrupted by user], when it stopped an answer, or a turn between a tool's result and the next step, or a prompt before any answer.
Ovis read that entry as the person's prompt: the chat drew a bubble in their name reading the mark, and the paged reader (transcript-turns.ts) opened a turn at it.
With this change:
claudeStopMark (server/claude-transcript.ts) knows the two marks, and isCommandEntry counts them, so neither the parser nor opensTurn takes one for a prompt.
One notice (source: "stopped", text Stopped) stands where the mark was, with its time, and the turn it cut short ends there (state.atWork). A mark in a plain string, which no recording has, is read the same way as one in a text block.
The chat draws that notice as one quiet line, Stopped · time (.chat-stopped), drawn as a goal's wait is: --text-dim--fs-sm between hairlines. Other notices keep their look. "Stopped" is added to the ja, ko and zh chat dictionaries.
It follows Claude Code's own terminal (2.1.330), which draws a stop as a dim Interrupted line, not as the person's message. The word is the chat's own, as in Stopped on an error. DESIGN.md has the entry.
Not changed: claudeTurnEnd still reads a session whose last entry is a stop as running, as it reads any user entry.
Validation
The record shapes come from the 400 most recent Claude Code session files on one machine (33 stops, Claude Code 2.1.295 to 2.1.330). Every mark is one text block, alone in a user entry; "for tool use" always follows a refused tool_result; no two marks come in a row. Only the shapes were read: the fixtures are written out, and no transcript text was copied.
bun test of server/conversation.test.ts, the new src/components/ChatView.stopped.test.tsx, src/components/ChatView.goalWait.test.tsx and server/claude-subagents.test.ts in the self-hosted CI runner image (Bun 1.4.4): 453 pass, 0 fail.
With main's code and the new tests, the 2 new tests fail (main gives each mark a user turn reading it) and the other 451 pass.
bun run check fast in the same image: workflow syntax, generated types and themes, typecheck and build pass. Unit tests have 21 failures, and the same ones fail on main (e16802a) in the same image:
scripts/plugin.test.ts (18) and scripts/relay-ios-sim.test.ts (2);
server/account/step2-upgrade-matrix.test.ts (1), which needs the v0.5.7 release objects my partial clone lacks.
The browser scripts that draw chat notices and rows pass in the same image, 4 of 4 with no retry: chat-request-details-demo-regression, sidebar-activity-demo-regression, terminal-autoswitch-demo-regression and chat-history-browser-qa.
On an earlier run of this branch, terminal-autoswitch-demo-regression failed its first attempt twice, waiting 10 s for a composer while the machine was busy (111 s runs against the usual 57 s). Run alone, it passed 3 times on this branch and 4 times on main.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Claude Code interruptions now appear as a single quiet “Stopped” line with a timestamp, instead of a user message. Interrupted tool results remain hidden.
Added translations for the stopped status in Japanese, Korean, and Simplified Chinese.
The transcript parser now recognizes Claude Code interruption markers and represents them as stopped notices. ChatView renders these notices as timestamped lines. Tests cover parsing and rendering, and translations and documentation are added.
Changes: Claude Code stop notices
Layer / File(s)
Summary
Recognize stop markers and create notices server/claude-transcript.ts, server/conversation.test.ts
The parser recognizes the two supported interruption markers and adds a stopped notice to the user turn. Tests check timestamps, turn starts, and rejected tool results.
Render and document stopped lines src/components/ChatView.tsx, src/components/ChatView.stopped.test.tsx, src/lib/i18n/chat.*.ts, DESIGN.md, changelog.d/claude-stop-notice.md
ChatView renders stopped notices as timestamped lines. Tests distinguish stopped lines from informational notices. Japanese, Korean, and Chinese translations and supporting documentation are added.
Claude Code stop markers now show as a quiet "Stopped" line instead of a user message. The change is localized to transcript parsing and chat rendering, and its tests cover the new behavior. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Claude Code stops are shown as one quiet "Stopped" line instead of a user message. It matches the changeset (claudeStopMark, the stopped notice in ChatView, and the ch…
Description check
The description follows the template. It has a Change section that explains the problem, the resulting behavior, and the affected files. It has a Validation section that lists the commands run, their …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: Claude Code stops are shown as one quiet "Stopped" line instead of a user message. It matches the changeset (claudeStopMark, the stopped notice in ChatView, and the changelog entry). The 97-character length is long but still one clear sentence.
Full details: Description check
Explanation
The description follows the template. It has a Change section that explains the problem, the resulting behavior, and the affected files. It has a Validation section that lists the commands run, their results, and the failures that also occur on main. It does not link an issue, but the template only asks for one for features, and this is a fix. The Change section does not state a contract-test status for the HTTP/WS change, so the reviewer must check that point.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 438b80c and 568992c.
Files selected for processing: 9
DESIGN.md
changelog.d/claude-stop-notice.md
server/claude-transcript.ts
server/conversation.test.ts
src/components/ChatView.stopped.test.tsx
src/components/ChatView.tsx
src/lib/i18n/chat.ja.ts
src/lib/i18n/chat.ko.ts
src/lib/i18n/chat.zh.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
…t as a message from the user
Claude Code records a stop (Esc) as a user entry, in the person's seat:
"[Request interrupted by user for tool use]" after the tool call it refused, or
"[Request interrupted by user]" when it stopped an answer. The chat drew it as the person's
message, and the paged reader opened a turn at it. It is now no prompt (claudeStopMark, through
isCommandEntry, so transcript-turns' opensTurn agrees), and one notice (source "stopped") stands
where it was, ending the turn it cut short. The chat draws it as a goal's wait is drawn:
"Stopped" and its time between hairlines. It follows Claude Code's own terminal, which draws a
stop as a dim "Interrupted" line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ode Mode receipts
Follow-up after rebasing devswha#4466 onto main and Codex adversarial review:
- Match Claude Code stop marks strictly via isClaudeStopEntry (single text-block array with no origin/permissionMode), keeping literal human prompts, multi-block prompts, Bash approval feedback beside tool_result, and human queued_command attachments intact in both parseClaudeTranscript and opensTurn.
- Call turnEnded() in stopped() and on non-handback peer messages so dispatched Code Mode REPL scripts settle to their dispatch receipt when Esc stops a turn.
Rebased onto latest main (549cba6ad) and pushed follow-up f7aedf759 addressing Codex adversarial review (gpt-6.2-sol-fast, xhigh) findings:
Guard against human prompts (isClaudeStopEntry): Match Claude Code's stop marks only when the entry is a single text-block array ([{ type: "text", text: "[Request interrupted by user]" | "[Request interrupted by user for tool use]" }]) with neither origin nor permissionMode. Human string prompts, prompts with origin/permissionMode, multi-block prompts, Bash approval feedback beside tool_result, and human queued_command attachments all stay intact in both parseClaudeTranscript and opensTurn.
Code Mode receipt settlement: Call turnEnded() in stopped() and on non-handback peer messages so dispatched Code Mode REPL scripts settle to (dispatched #N) (ok) instead of remaining pending when Esc stops a turn.
LOW notes from review (non-blocking):
Pre-upgrade saved scroll anchors pointing at a genuine stop row change from text|[Request interrupted by user] to notice|Stopped, so chatRestoreIndex() falls back to the bottom on first load after upgrade.
If a stop notice lands right as herdr transitions working → idle, ChatView's brief 2 s answer-grace footer can still appear momentarily below Stopped.
Before / After UI screenshots (isolated demo build, light theme, Korean)
Captured from an isolated demo build using parseClaudeTranscript on a Claude Code transcript containing both [Request interrupted by user for tool use] (Esc at tool approval) and [Request interrupted by user] (Esc mid-response):
Merged through pr-merge at head f7aedf759. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
Fixes `src/lib/i18n.test.ts` failure on `main` (`7d9229772`) after #4624
(`sidebar` `"Stopped"`: `"멈춤"` / `"停止中"`) and #4466 (`chat` `"Stopped"`:
`"중지됨"` / `"停止しました"`) both landed the same key in two dictionary parts.
Uses the context-qualified key `"Stopped|chat"` in `ChatView.tsx` and
`src/lib/i18n/chat.{ko,ja,zh}.ts` so English still displays `"Stopped"`
via `key.split("|", 1)[0]`, chat stop lines keep `"중지됨"` / `"停止しました"` /
`"已停止"` as approved in #4466, and sidebar held-agent pills keep `"멈춤"` /
`"停止中"` / `"已停止"` from #4624.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Claude Code records a stop (Esc) as a user entry, in the person's seat:
[Request interrupted by user for tool use], after the tool call whose prompt was refused;[Request interrupted by user], when it stopped an answer, or a turn between a tool's result and the next step, or a prompt before any answer.Ovis read that entry as the person's prompt: the chat drew a bubble in their name reading the mark, and the paged reader (
transcript-turns.ts) opened a turn at it.With this change:
claudeStopMark(server/claude-transcript.ts) knows the two marks, andisCommandEntrycounts them, so neither the parser noropensTurntakes one for a prompt.source: "stopped", textStopped) stands where the mark was, with its time, and the turn it cut short ends there (state.atWork). A mark in a plain string, which no recording has, is read the same way as one in a text block..chat-stopped), drawn as a goal's wait is:--text-dim--fs-smbetween hairlines. Other notices keep their look. "Stopped" is added to the ja, ko and zh chat dictionaries.Not changed:
claudeTurnEndstill reads a session whose last entry is a stop asrunning, as it reads any user entry.Validation
bun testofserver/conversation.test.ts, the newsrc/components/ChatView.stopped.test.tsx,src/components/ChatView.goalWait.test.tsxandserver/claude-subagents.test.tsin the self-hosted CI runner image (Bun 1.4.4): 453 pass, 0 fail.bun run check fastin the same image: workflow syntax, generated types and themes, typecheck and build pass. Unit tests have 21 failures, and the same ones fail on main (e16802a) in the same image:scripts/plugin.test.ts(18) andscripts/relay-ios-sim.test.ts(2);server/account/step2-upgrade-matrix.test.ts(1), which needs the v0.5.7 release objects my partial clone lacks.chat-request-details-demo-regression,sidebar-activity-demo-regression,terminal-autoswitch-demo-regressionandchat-history-browser-qa.terminal-autoswitch-demo-regressionfailed its first attempt twice, waiting 10 s for a composer while the machine was busy (111 s runs against the usual 57 s). Run alone, it passed 3 times on this branch and 4 times on main.🤖 Generated with Claude Code