diff --git a/src/renderer/src/components/terminal-pane/terminal-ctrl-enter.test.ts b/src/renderer/src/components/terminal-pane/terminal-ctrl-enter.test.ts index 4cb4b9a1b52..94c277436cf 100644 --- a/src/renderer/src/components/terminal-pane/terminal-ctrl-enter.test.ts +++ b/src/renderer/src/components/terminal-pane/terminal-ctrl-enter.test.ts @@ -41,7 +41,7 @@ describe('hasCtrlEnterCsiUAuthorityForPane', () => { ) it('authorizes only trusted Ctrl+Enter CSI-u consumers', () => { - for (const agent of ['droid', 'grok', 'opencode'] as const) { + for (const agent of ['claude', 'droid', 'grok', 'opencode'] as const) { expect( hasCtrlEnterCsiUAuthorityForPane( { diff --git a/src/shared/tui-agent-config.ts b/src/shared/tui-agent-config.ts index a9cb6910aef..22667980e5b 100644 --- a/src/shared/tui-agent-config.ts +++ b/src/shared/tui-agent-config.ts @@ -28,7 +28,9 @@ const TUI_AGENT_CONFIG_SOURCE: Record = { preflightTrust: 'claude', // Why: CLAUDE_CODE_DISABLE_TERMINAL_TITLE drops the `✳` title tui-idle waits on (#22655). draftPasteReadySignal: 'claude-composer-prompt', - workerStartReadsComposerMarker: true + workerStartReadsComposerMarker: true, + // Why: Claude decodes CSI-u Ctrl+Enter on local ConPTY; CR made a remapped ctrl+enter act as Enter (#29711). + ctrlEnterEncoding: 'csi-u' }, 'claude-agent-teams': { // Why: an Orca-provided launch mode, not a separate binary; detection follows the Orca CLI. @@ -48,7 +50,9 @@ const TUI_AGENT_CONFIG_SOURCE: Record = { pasteNeedsTypedRequest: true, preflightTrust: 'claude', draftPasteReadySignal: 'claude-composer-prompt', - workerStartReadsComposerMarker: true + workerStartReadsComposerMarker: true, + // Why: runs the same Claude binary, so Ctrl+Enter must match `claude`. + ctrlEnterEncoding: 'csi-u' }, codebuddy: { detectCmd: 'codebuddy',