Context
Follow-up from the review of #669.
The cached-context /model confirmation path in plugins/claude-code-hermit/scripts/stop-pipeline.ts recognizes the graphical choice prompt and sends a bare Enter, relying on the selected Yes option.
Claude Code also supports an accessibility confirmation UI when started with --ax-screen-reader or CLAUDE_CODE_ACCESSIBILITY. The reported prompt requires an explicit y or n; sending only Enter can leave the pane at Please answer y or n.
Current failure mode
drainHarnessCommand() clears the pending-command marker immediately after delivering /model.
isModelSwitchConfirmation() can still match the accessibility prompt text.
- The confirmation path calls
sendEnter() and logs the switch as confirmed when tmux accepts the key, without verifying that Claude Code accepted the choice.
- In accessibility mode, the session can therefore remain stalled with no marker left to retry.
Acceptance criteria
- Detect the accessibility confirmation variant separately from the graphical choice widget.
- Submit an explicit
y for that variant while preserving Enter for the graphical default-selection prompt.
- Do not report a confirmed model switch merely because tmux accepted the confirmation keystroke.
- Preserve a bounded retry or recovery path when confirmation is not accepted.
- Add regression coverage for both graphical and accessibility confirmation flows.
- Empirically verify the accessibility flow against a real Claude Code session before closing.
This is a deferred compatibility follow-up and is not intended to block #669.
Context
Follow-up from the review of #669.
The cached-context
/modelconfirmation path inplugins/claude-code-hermit/scripts/stop-pipeline.tsrecognizes the graphical choice prompt and sends a bareEnter, relying on the selectedYesoption.Claude Code also supports an accessibility confirmation UI when started with
--ax-screen-readerorCLAUDE_CODE_ACCESSIBILITY. The reported prompt requires an explicityorn; sending onlyEntercan leave the pane atPlease answer y or n.Current failure mode
drainHarnessCommand()clears the pending-command marker immediately after delivering/model.isModelSwitchConfirmation()can still match the accessibility prompt text.sendEnter()and logs the switch as confirmed when tmux accepts the key, without verifying that Claude Code accepted the choice.Acceptance criteria
yfor that variant while preservingEnterfor the graphical default-selection prompt.This is a deferred compatibility follow-up and is not intended to block #669.