Context
Child of #10658. The Claude Desktop Shape C bridge path regressed after the wake/recovery work exposed a bad implicit invariant: Cmd+3 reliably selects the Claude Code tab, but it does not reliably focus the Claude Code prompt field.
Operator observations during the #10658 forensic thread:
Cmd+3 is stable for selecting the Claude Code tab.
- Starting the bridge prep sequence with
Cmd+A can select chat-history/session text when the prompt is not already focused.
- Typing a normal key inside the Code tab moves focus into the input field.
- Space is the safest focus seed observed so far: when the prompt is not focused, Space focuses the input without writing a visible character.
- Read-only System Events / Accessibility probes could detect
AXFocusedWindow, but not prompt focus. AXFocusedUIElement returned missing value both before and after the operator manually focused the prompt.
Duplicate sweep notes:
ask_knowledge_base(type: 'ticket', query='existing ticket Claude Desktop Space focus seed bridge daemon prompt focus Cmd+A transcript history') returned no relevant ticket.
- Local resource sweep across
resources/content/issues, resources/content/issue-archive, and resources/content/discussions found adjacent tickets but no equivalent Space focus-seed ticket.
- Live latest-20 open GitHub issue sweep was read with title/author/labels. Adjacent entries included #10658 (broad Claude prompt-focus parent), #10647 (wake-stability epic), #10643 (Gemini parallel
checkSunsetted originSessionId work), #10517 (HarnessPresence/wakePolicy), and #10422 (older AppleScript focus-steal bleed). None owns this minimal Claude Space focus seed.
The Problem
ai/scripts/bridge-daemon.mjs currently prepares the target prompt after tab selection by starting with destructive selection/cut chords:
activate Claude -> Cmd+3 -> Cmd+A -> Cmd+X -> paste wake -> Enter
When Claude Code tab owns focus but the prompt composer does not, Cmd+A can select transcript/history text instead of prompt text. This matches the hard-stop observation in #10658: the bridge selected active session text content rather than the input field.
The bridge therefore needs a non-destructive prompt-focus seed between Cmd+3 and Cmd+A for Claude Desktop.
The Architectural Reality
This is a Shape C bridge-daemon issue, not a fresh-session recovery issue and not a generic Claude API search.
Relevant current code:
ai/scripts/bridge-daemon.mjs:575-583 resolves tabShortcut, with Claude defaulting to 3.
ai/scripts/bridge-daemon.mjs:613-620 emits the tab-selection shortcut.
ai/scripts/bridge-daemon.mjs:623-628 immediately runs Cmd+A / Cmd+X.
ai/docs/wake-prompt-landing-matrix.md:5-7 states that adapter success is not enough; prompt landing is the observable success criterion.
learn/agentos/tooling/WakeSubstrateIncidentProtocol.md:110-123 requires loop-level evidence before reactivation.
The known-good route before the regression was still osascript; the mistake was treating tab selection as prompt focus. tabShortcut: '3' remains correct as a tab selector. It is not a prompt-focus primitive.
The Fix
For Claude Desktop only, insert a Space focus seed after Cmd+3 and before any Cmd+A / Cmd+X sequence.
Target sequence:
activate Claude -> Cmd+3 -> Space -> Cmd+A -> Cmd+X -> paste wake -> Enter
Implementation expectations:
- Add the Space seed only for
appName === 'Claude' or an explicit Claude-specific metadata primitive.
- Keep Antigravity's
Cmd+Shift+I path untouched.
- Prefer
key code 49 or an equivalent unambiguous AppleScript representation for Space.
- Add adapter-intent regression coverage in
test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs proving the Space seed is emitted after Claude Cmd+3 and before Cmd+A.
- Preserve the existing clipboard/user-draft restoration behavior.
Acceptance Criteria
Out of Scope
- Implementing Claude Channels or CLI/session-target delivery.
- Implementing a deep native Accessibility inspector beyond the read-only probes already attempted.
- Fixing
checkSunsetted originSessionId extraction; Gemini is already working #10643 in parallel.
- Changing fresh-session
resumeHarness.mjs behavior.
- Reactivating bridge or heartbeat globally.
Avoided Traps
- Trap:
Cmd+3 means prompt focus. Rejected. It means Code-tab selection only.
- Trap: start with
Cmd+A and trust adapter success. Rejected. It can select transcript/history text.
- Trap: wait for Channels before restoring the known-good Shape C route. Rejected for this quick win. Channels remains strategic, but this ticket restores the osascript path that worked before.
- Trap: unit test equals reactivation proof. Rejected. Unit coverage proves adapter intent; #10649 live matrix proves loop safety.
Related
Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4
Retrieval Hint: "Claude Desktop Space focus seed bridge daemon Cmd+3 Cmd+A transcript prompt focus #10658"
Context
Child of #10658. The Claude Desktop Shape C bridge path regressed after the wake/recovery work exposed a bad implicit invariant:
Cmd+3reliably selects the Claude Code tab, but it does not reliably focus the Claude Code prompt field.Operator observations during the #10658 forensic thread:
Cmd+3is stable for selecting the Claude Code tab.Cmd+Acan select chat-history/session text when the prompt is not already focused.AXFocusedWindow, but not prompt focus.AXFocusedUIElementreturnedmissing valueboth before and after the operator manually focused the prompt.Duplicate sweep notes:
ask_knowledge_base(type: 'ticket', query='existing ticket Claude Desktop Space focus seed bridge daemon prompt focus Cmd+A transcript history')returned no relevant ticket.resources/content/issues,resources/content/issue-archive, andresources/content/discussionsfound adjacent tickets but no equivalent Space focus-seed ticket.checkSunsettedoriginSessionId work), #10517 (HarnessPresence/wakePolicy), and #10422 (older AppleScript focus-steal bleed). None owns this minimal Claude Space focus seed.The Problem
ai/scripts/bridge-daemon.mjscurrently prepares the target prompt after tab selection by starting with destructive selection/cut chords:When Claude Code tab owns focus but the prompt composer does not,
Cmd+Acan select transcript/history text instead of prompt text. This matches the hard-stop observation in #10658: the bridge selected active session text content rather than the input field.The bridge therefore needs a non-destructive prompt-focus seed between
Cmd+3andCmd+Afor Claude Desktop.The Architectural Reality
This is a Shape C bridge-daemon issue, not a fresh-session recovery issue and not a generic Claude API search.
Relevant current code:
ai/scripts/bridge-daemon.mjs:575-583resolvestabShortcut, with Claude defaulting to3.ai/scripts/bridge-daemon.mjs:613-620emits the tab-selection shortcut.ai/scripts/bridge-daemon.mjs:623-628immediately runsCmd+A/Cmd+X.ai/docs/wake-prompt-landing-matrix.md:5-7states that adapter success is not enough; prompt landing is the observable success criterion.learn/agentos/tooling/WakeSubstrateIncidentProtocol.md:110-123requires loop-level evidence before reactivation.The known-good route before the regression was still
osascript; the mistake was treating tab selection as prompt focus.tabShortcut: '3'remains correct as a tab selector. It is not a prompt-focus primitive.The Fix
For Claude Desktop only, insert a Space focus seed after
Cmd+3and before anyCmd+A/Cmd+Xsequence.Target sequence:
Implementation expectations:
appName === 'Claude'or an explicit Claude-specific metadata primitive.Cmd+Shift+Ipath untouched.key code 49or an equivalent unambiguous AppleScript representation for Space.test/playwright/unit/ai/scripts/bridge-daemon.spec.mjsproving the Space seed is emitted after ClaudeCmd+3and beforeCmd+A.Acceptance Criteria
Cmd+3, then Space focus seed, thenCmd+A/Cmd+X.Cmd+Shift+Ifor its focus path.Cmd+A.Out of Scope
checkSunsettedoriginSessionId extraction; Gemini is already working #10643 in parallel.resumeHarness.mjsbehavior.Avoided Traps
Cmd+3means prompt focus. Rejected. It means Code-tab selection only.Cmd+Aand trust adapter success. Rejected. It can select transcript/history text.Related
Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4
Retrieval Hint: "Claude Desktop Space focus seed bridge daemon Cmd+3 Cmd+A transcript prompt focus #10658"