Resume a session as a Claude tab so Shift+Enter inserts a newline #67

Merged
jknapp merged 1 commits from fix/resume-opens-claude-session into main 2026-10-17 02:22:14 +00:00
Owner

Problem

Shift+Enter submitted the prompt instead of inserting a newline in any conversation opened with [Resume] (Sessions tab or Overview → Recent sessions).

[Resume] opened a "bash" session and typed claude --resume <id> into it. The Shift+Enter → ESC+CR binding in TerminalView.tsx only fires for tabs whose session type is "claude", so those tabs sent a bare CR. The status-bar "Shift+Enter: newline" hint and Notes' Send to agent skipped them for the same reason. The tab label also hid it: a custom session name suppresses the (bash) suffix.

Fix

  • open_terminal_session takes an optional resume_session_id (validated with the existing validate_session_id) and launches claude --resume <id> through the normal Claude path: update prelude, permission flags, Bedrock SSO check. A bash session with a resume id is refused.
  • -n is dropped when resuming, so the tab label ("resume" for an unnamed conversation) does not rename the conversation.
  • New useProjectActions.resumeClaudeSession; both Resume buttons use it. openTerminalWithCommand remains for "Manage in terminal".
  • resume_session_command is removed with its allow-resume-session-command grant (the command census in build.rs requires it); the gen/schemas changes are the regenerated removals.

Tests

  • Rust: build_terminal_cmd_resumes_without_renaming. Full lib suite: 870 passed.
  • Vitest: useTerminal open registers a resumed tab as "claude" and passes the id through. Full suite: 1061 passed. tsc --noEmit clean.
  • Not yet verified in the running app: resume a session, press Shift+Enter, expect a newline.

🤖 Generated with Claude Code

## Problem Shift+Enter submitted the prompt instead of inserting a newline in any conversation opened with **[Resume]** (Sessions tab or Overview → Recent sessions). [Resume] opened a `"bash"` session and typed `claude --resume <id>` into it. The Shift+Enter → ESC+CR binding in `TerminalView.tsx` only fires for tabs whose session type is `"claude"`, so those tabs sent a bare CR. The status-bar "Shift+Enter: newline" hint and Notes' Send to agent skipped them for the same reason. The tab label also hid it: a custom session name suppresses the ` (bash)` suffix. ## Fix - `open_terminal_session` takes an optional `resume_session_id` (validated with the existing `validate_session_id`) and launches `claude --resume <id>` through the normal Claude path: update prelude, permission flags, Bedrock SSO check. A bash session with a resume id is refused. - `-n` is dropped when resuming, so the tab label (`"resume"` for an unnamed conversation) does not rename the conversation. - New `useProjectActions.resumeClaudeSession`; both Resume buttons use it. `openTerminalWithCommand` remains for "Manage in terminal". - `resume_session_command` is removed with its `allow-resume-session-command` grant (the command census in `build.rs` requires it); the `gen/schemas` changes are the regenerated removals. ## Tests - Rust: `build_terminal_cmd_resumes_without_renaming`. Full lib suite: 870 passed. - Vitest: `useTerminal open` registers a resumed tab as `"claude"` and passes the id through. Full suite: 1061 passed. `tsc --noEmit` clean. - Not yet verified in the running app: resume a session, press Shift+Enter, expect a newline. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-10-17 02:11:58 +00:00
fix: resume a session as a Claude tab, not a bash tab
Secret Scan / scan (push) Successful in 6s
Build App (Preview) / compute-version (pull_request) Successful in 4s
Secret Scan / scan (pull_request) Successful in 5s
Build App (Preview) / create-release (pull_request) Successful in 2s
Build App (Preview) / build-macos (pull_request) Successful in 3m26s
Build App (Preview) / test (pull_request) Successful in 6m10s
Build App (Preview) / build-windows (pull_request) Successful in 7m37s
Build App (Preview) / build-linux (pull_request) Successful in 8m10s
Build App (Preview) / prune-previews (pull_request) Successful in 2s
d00afe7666
[Resume] opened a "bash" session and typed `claude --resume <id>` into it.
The tab's session type is what the Shift+Enter binding keys off, so in a
resumed conversation Shift+Enter submitted the prompt instead of inserting
a newline. The status-bar hint and Send to agent missed those tabs too.

open_terminal_session now takes an optional resume_session_id and launches
`claude --resume <id>` through the normal Claude path (update prelude,
permission flags, Bedrock SSO check). `-n` is dropped when resuming so the
tab label ("resume" when the conversation has no name) does not rename the
conversation. resume_session_command and its capability grant are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jknapp merged commit af59dc8bec into main 2026-10-17 02:22:14 +00:00
jknapp deleted branch fix/resume-opens-claude-session 2026-10-17 02:22:15 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CyberCoveLLC/Triple-C#67