Repository navigation
fix(chat): send a Claude Code message that ends in a backslash - #2278
Conversation
Claude Code reads `\` + Enter as a new line, so the Enter after a Chat or queued message whose last character is a backslash added a line instead of sending it: the message stayed in Claude's input box, while Chat cleared its own box. A space after a trailing backslash lets the Enter send, and Claude Code records the message without the space (Claude Code 2.1.312). The terminal's input line keeps `\` + Enter, as the keyboard types it. Closes devswha#2277 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HabHntUPvy5yA9iU3G1m5y
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Normalize Claude Chat submissions server/core/composer.ts, server/submit.contract.test.ts |
The submit path adds a space after a trailing backslash in Claude messages. Tests verify that internal backslashes, OMP submissions, and typed Claude submissions remain unchanged. |
Normalize queued messages server/core/pending.ts, server/pending-input.contract.test.ts, changelog.d/claude-trailing-backslash.md |
Pending-message dispatch applies the same handling. Tests verify the Claude adjustment and that Codex messages retain a trailing backslash. The changelog describes the Chat and queued-message behavior. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: devswha
Merge Risk: 
Minimal · previous review c84b4
-
The Claude trailing-backslash change is ready to merge.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
The implementation satisfies
#2277.closeBackslashappends one space only for Claude messages that end in\\. The immediate Chat path applies it inserver/core/composer.ts, and the queued path applies it inserver/core/pending.ts. The submit contract test covers the trailing backslash, an internal backslash, OMP, andtyped: trueterminal input. The pending-input contract test covers Claude and Codex behavior.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within
#2277. The changelog and contract-test updates document and verify the fix. No unrelated production behavior is changed; non-Claude agents, internal backslashes, and terminal input remain unchanged.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files. (1 skipped: 1 unsupported.)
-
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.
Comment @coderabbitai help to get the list of available commands.
…s a backslash-closed message A Claude message ending in a backslash gets a space so its Enter sends; the agent.prompt fallback now types the validated payload with that space inside its closing paste marker, instead of the bare rewritten text that lost the paste markers and newline encoding.
|
Merging ddc65f4 (external, @jpcarranza94; closes #2277). Codex was at capacity, so an omo reviewer and an independent second reviewer reviewed it strictly. herdr's agent.prompt pastes a message and presses Enter, and Claude Code reads a final backslash plus Enter as a new line, so a Chat or queued message ending in a backslash stayed in Claude's box. |
## Release 0.4.20 The release PR, prepared by step 1 of [docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing), initially on main `bd676637a16471e8744d62c7311026ddb43a39eb` (#2335, xterm 6), then merged with final-scope main `ef482f2e66b3344658fb548fa1110744a92929c9` (#2338) and test-only follow-up main `269e9ce19558b8d197959250075da56b25b9668f` (#2345): - **Version:** `version` is 0.4.20 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.20` initially folded 122 fragments into the 2026-10-29 section of `CHANGELOG.md`, linked their PRs, and deleted the fragments. After merging main, the modified `letta-native-chat.md` from #2338 was folded by hand with its current wording and PR link. No other late fragment landed; `changelog.d` holds only `README.md`. Four additional entries for external PRs without their own fragments bring the section to 157 entries. - Added 22 `by @login` credits across all 19 outside-contributor PRs in the release range. Preserved the existing credit to @Yoonwoo-Ha for #1634. See the complete ancestry-based audit below. - **Release summaries:** en, ko, ja and zh each have 5 new, 5 improved and 5 fixed lines, matching 0.4.19's shape. They include the xterm 6 improvement: terminal frames no longer mix old and new output. Every English line is at most 80 characters. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 38 to 39 because the bundle inputs changed since remote-v38. - **Telemetry:** the guard confirms no Worker deploy or deployed fingerprint update is needed. - **iOS upload note:** CURRENT_PROJECT_VERSION raised to 3 for App and OvisNotifications (last uploaded: 2, source: `docs/native-app.md:99`, commit `54fdadc1c65da5d50a6afef411e3ed8f23b6c255`). Both targets inherit project-level Debug and Release settings, and every `CURRENT_PROJECT_VERSION` entry is 3. `app/store/ios.md` now records the prepared build. This is the last documented upload, not a live App Store Connect query; check for later uploads before uploading. The marketing version remains 1.0. - The changelog explicitly distinguishes delivery: removing WebKit's form bar (#2109) requires the new iOS app build, while Korean composition (#2307) comes with the PC update and needs no new iOS build. The Korean-input summary says the same in all four languages, with no change to list counts. ## Validation - Final `dori heavy release-check -- bun run check fast`: passed, exit 0; workflow syntax, generated types/themes, typecheck, build and unit suite (8,591 pass, 0 fail, 34 platform skips in 549 files). This is the merged tree containing #2338, #2345, the contributor corrections and iOS build 3. - `bun test scripts/changelog-fold.test.ts server/release-notes.test.ts`: 33 pass, 0 fail. - `bun scripts/release-notes.ts 0.4.20`: passed, with all patch-note lists and the full changelog. - `bun scripts/release-guards.ts` and CI mode with `--base ef482f2`: passed on the final merged tree: "Release 0.4.20: remote bundle, telemetry Worker and release metadata are in order." - `bun scripts/release-guards.ts --release 0.4.20`: expected exit 1 only because "remote-v39 is not published." The merge pass publishes it after merging. ## Merge pass **Do not merge before the owner's OK.** - [ ] Merge only after the owner's OK and required checks pass. - [ ] After merging, push `remote-v39` on the merged commit and wait for the **Remote PC bundles** workflow to publish the manifest and all archives. - [ ] Then run **Release** on `main` with version `0.4.20`, without `v`. The Release workflow creates the app tag; do not push it by hand. - [ ] From this PR's merge until the Release run is done, merge nothing touching `server/`, `shared/`, `bun.lock` or `patches/`. - [ ] A changelog fragment merged after this PR must be moved into 0.4.20 by hand. This lane stops at the open PR. No tag, workflow dispatch, merge or telemetry deploy was performed. **Completed release follow-up:** merged main `ef482f2e` including #2338 (`fix/letta-no-live-box`), folded its revised fragment into 0.4.20, and retained the contributor-credit commit `184dc120` and iOS-build commit `0ffa3d45`. The Letta summary already describes conversation support without promising a live-terminal box, so it needs no change. Merged test-only #2345 from main `269e9ce1`: the two usage browser checks now wait for the earlier shared account-order save and start the sign-in check from a cleared order. No product behavior or late fragment was added; `changelog.d` still contains only `README.md`. The iOS delivery clarification and resolved review thread are retained. ## Complete external-contributor audit Checked every merged PR whose merge commit is in `git log v0.4.19..origin/main`: 133 PRs through final-scope main `ef482f2e`, or 134 including test-only #2345 on `269e9ce1`, with 19 PRs by 12 external non-bot authors. Both rescans found no additional external-author gaps; #2345 is by the maintainer. Added the four missing entries: #2271 and #2274 by @CharleoYang, #2290 by @DravenDou, and #2282 by @fivetaku. The tab-reopening summary now includes the history-page improvement in all four languages; list counts remain 5/5/5. Full external PR list checked: #1911 @jjsteffen; #2068 @YuuuXie; #2072 @Noobear; #2087 @JJLiebig; #2145 @mattmarcin; #2176 @jpcarranza94; #2231 @philipprass-prog; #2235 @vuongnmhvn; #2270, #2271, #2274 @CharleoYang; #2278 @jpcarranza94; #2282 @fivetaku; #2283, #2292, #2293 @YuuuXie; #2301 @jpcarranza94; #2321 @kilhyeonjun. Every PR has a linked `by @login` credit in 0.4.20. --------- Co-authored-by: sisyphus-dev-ai <[email protected]>
Change
Closes #2277.
A Chat message to Claude Code whose last character is a backslash was not sent. herdr's
agent.promptpastes the text and then presses Enter, and Claude Code reads\+ Enter as "insert a new line". So the message stayed in Claude's input box with an empty line under it, while Chat cleared its own box as for a sent message. A queued message has the same paste-then-Enter shape, and the same problem.closeBackslash(server/core/composer.ts) adds a space after a trailing backslash of a message to Claude Code. With the space, the Enter sends, and Claude Code records the message without it (checked live, Claude Code 2.1.312: the transcript holdsReply with only OK \)./modelrewrite: the immediate Chat send (submitText) and the queued send (pending.ts).\+ Enter is what the keyboard types (in a shell, a continued line).… path C:\temp\xand a multi-line message whose first line ends in\were both sent.The idea is the same as
closeMention, which adds a space after a trailing@filemention so that the Enter sends (#404).Validation
server/submit.contract.test.ts, "sends Claude a message that ends in a backslash with a space after it": the Claude pane gets the paste with the space, then Enter. A backslash before the end, a message to omp, and the terminal's input line go as written. It fails onmain.server/pending-input.contract.test.ts, "delivers queued $text as $expected to $agent": two new rows, Claude (with the space) and Codex (as written). The Claude row fails onmain.Reply with only OK \stayed in Claude's box, andReply with only OK \was sent.bun run check fast: typecheck, build, conventions and the changelog check pass. The unit test files that fail fail the same way on unchangedmainon this headless Mac (scripts/check,ci-browser,install-star,self-hosted-runner,remote-entry,session-history,shell-agent,bridge,core/composer-framing). The last two are 5-second timeouts there.changelog.d/claude-trailing-backslash.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01HabHntUPvy5yA9iU3G1m5y