fix(session): unify tmux inject path on bracketed-paste with verifier (0.28.77)#158
Open
JKHeadley wants to merge 1 commit into
Open
fix(session): unify tmux inject path on bracketed-paste with verifier (0.28.77)#158JKHeadley wants to merge 1 commit into
JKHeadley wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
a921dab to
e383f40
Compare
Single-line rawInject previously skipped the bracketed-paste markers and the 500ms settle delay, sending text + Enter back-to-back. Claude Code 2.1.x's TUI then auto-detected the fast character stream as a paste and ate the immediately-following Enter — leaving text visible-but-unsubmitted at the prompt forever. Reproduced live in topic 9235 (qalatra) at 2026-05-11T23:08:47Z, stuck for 52 minutes until manual Enter unstuck it. Unifies single-line and multi-line paths to use the proven bracketed-paste sequence (markers + 500ms settle + Enter) for every inject. Adds a C0/C1 control-byte sanitizer at the input boundary to close the paste-exit-marker injection vector (\x1b[201~-class bytes in user-controlled message bodies). Defense-in-depth from PR #159's multi-shot verifyInjection stays in place as a backstop; with the unification it should rarely (if ever) need to fire for single-line injects. Trimmed scope from converged 5-round spec (4 internal + 1 cross-model external). Broader infrastructure (seq+incarnation guards, two-sample confirm, config knobs) deferred to follow-up to avoid orphaning PR #159's concurrently-merged verifier-layer work. Spec §4.7 documents the deferred pieces as Phase-3 follow-ups. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e383f40 to
614c715
Compare
JKHeadley
commented
May 12, 2026
Summary
rawInjectso every inject (single-line + multi-line) uses bracketed-paste markers + 500ms settle + Enter, eliminating the eaten-Enter failure mode reproduced live in qalatra (topic 9235).sessions::injectVerifyEnabled(default true) andpromptSigilRegex(hot-fixable Claude Code prompt regex).Spec converged through 5 review rounds (4 internal multi-angle + 1 cross-model external GPT/Gemini/Grok). Async conversion of the inject path was scope-cut to a follow-up; the reported bug is fully fixed by the unification alone.
Test plan
tests/unit/SessionManager-bracketed-paste.test.ts(sanitization, ANSI strip, secret redaction, unified path wiring, verifier scheduling, config knobs)tests/unit/paste-stuck-detection.test.tsupdated and passingtests/unit/SessionManager-injection.test.tspassing unchangednpm run test:pushsmoke tier green locally (285/285)🤖 Generated with Claude Code