Skip to content

feat(claude-loop): strategy-A consumer — set @human-input-marker for psmux-native human detection (psmux#309)#13

Merged
quazardous merged 1 commit into
mainfrom
feat/win-human-input-marker
May 21, 2026
Merged

feat(claude-loop): strategy-A consumer — set @human-input-marker for psmux-native human detection (psmux#309)#13
quazardous merged 1 commit into
mainfrom
feat/win-human-input-marker

Conversation

@quazardous

Copy link
Copy Markdown
Owner

Follow-up to #10 (Windows ConPTY proxy, strategy B). This wires the strategy-A consumer side.

What

cli.ts sets the session option @human-input-marker (to the loop's existing human-typing marker path) at new-session. psmux builds with the matching feature — proposed upstream as psmux/psmux#309 — then touch that marker natively on real human keystrokes, busy included, with no nested ConPTY. The existing humanIsTyping / setTmuxStatus / pushState readers consume it unchanged.

Why strategy A is cleaner than the proxy (strategy B, #10)

psmux is the multiplexer, so it already routes human keystrokes (forward_key_to_active) and send-keys/paste-buffer injection through different code paths. Exposing that native separation avoids the proxy's nested-ConPTY double-conhost translation tax entirely. The classifier is also trivial upstream — psmux has the decoded KeyCode::Char, so no win32-input-mode parsing.

Safety / no regression

Version-safe: older psmux and tmux just store the unknown @human-input-marker option and ignore it, so the idle-only pane-diff fallback still applies. Once psmux#309 ships in a release, the pane-diff write can be disabled (version-gated) so the native marker becomes the sole source. Strategy B (the ConPTY proxy from #10) remains the fallback for psmux builds without the feature.

docs/PTY-PROXY-WINDOWS.md strategy-A section updated to reflect the upstream PR. typecheck + eslint clean.

… (psmux#309)

cli.ts sets the `@human-input-marker` session option to the loop's existing
`human-typing` marker path at new-session. psmux builds with the feature
(psmux/psmux#309) then touch that marker natively on real human keystrokes —
busy included, no nested ConPTY — and the existing humanIsTyping /
setTmuxStatus / pushState readers consume it unchanged.

Version-safe: older psmux + tmux store the unknown option and ignore it, so
the pane-diff fallback still applies (no regression). Complements the ConPTY
proxy (strategy B); see docs/PTY-PROXY-WINDOWS.md (strategy A section updated
to reflect the upstream PR).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant