feat(claude-loop): strategy-A consumer — set @human-input-marker for psmux-native human detection (psmux#309)#13
Merged
Conversation
… (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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #10 (Windows ConPTY proxy, strategy B). This wires the strategy-A consumer side.
What
cli.tssets the session option@human-input-marker(to the loop's existinghuman-typingmarker path) atnew-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 existinghumanIsTyping/setTmuxStatus/pushStatereaders 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) andsend-keys/paste-bufferinjection 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 decodedKeyCode::Char, so no win32-input-mode parsing.Safety / no regression
Version-safe: older psmux and tmux just store the unknown
@human-input-markeroption 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.mdstrategy-A section updated to reflect the upstream PR. typecheck + eslint clean.