This repository was archived by the owner on Mar 26, 2026. It is now read-only.
fix(tmux): use Enter key name instead of C-m for prompt submission#295
Merged
jsell-rh merged 1 commit intojsell-rh:mainfrom Mar 25, 2026
Merged
Conversation
tmux 3.5a with Claude Code v2.1.83 no longer accepts raw C-m (0x0D) as Enter when the application has enabled extended key encoding (CSI u mode). The tmux send-keys key name "Enter" works in both legacy and extended modes across all tmux versions. This affected tmuxSendKeys and tmuxPasteInput — agents would receive text in their input buffer (shown as "[Pasted text jsell-rh#1]") but the subsequent C-m never submitted it, leaving agents stuck indefinitely. Notably, tmuxApprove and tmuxAlwaysAllow already used "Enter", which is why approval flows were unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jsell-rh
approved these changes
Mar 25, 2026
Owner
jsell-rh
left a comment
There was a problem hiding this comment.
Solid, well-documented fix. The root-cause analysis is accurate — tmux 3.5a + CSI u extended key encoding broke the raw C-m (0x0D) path while Enter routes through the proper escape sequence negotiated by the application. The observation that tmuxApprove already used "Enter" and was unaffected is a nice consistency cross-check.
Two things I want to call out as especially good:
- The compatibility note is correct:
Enterhas been a valid tmux key name since 1.x, so this is a safe change across the entire version matrix. - The test plan is honest — the tmux 3.3/3.4 box is left unchecked rather than rubber-stamped. That's the right call.
Merging.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
C-mwithEnterintmuxSendKeysandtmuxPasteInputto fix agent input submission on tmux 3.5a + Claude Code v2.1.83Root Cause
tmux
send-keyssupports two ways to send the Enter key:C-m— sends raw byte0x0D(carriage return)Enter— sends the Enter key using whatever encoding the application has negotiatedClaude Code v2.1.83 enables extended key encoding (CSI u mode) in the terminal. In this mode, tmux 3.5a sends
Enterusing the extended escape sequence, butC-mis still sent as raw0x0D. Claude Code's TUI only accepts the extended form for prompt submission when pasted text is in the input buffer.Symptoms
When OpenDispatch sent text to an agent via
tmuxSendKeysortmuxPasteInput:[Pasted text #1]C-mdid not submit the inputNotably,
tmuxApproveandtmuxAlwaysAllowalready used"Enter"(not"C-m"), which is why approval flows were unaffected.How to verify
On a system with tmux 3.5a and Claude Code v2.1.83+:
Compatibility
Enteris a standard tmux key name documented since tmux 1.x, listed alongsideUp,Down,Space,Escape, etc. It works correctly across all tmux versions in both legacy and extended key modes.Test plan
go test -race ./internal/coordinator/)Entersubmits pasted text on tmux 3.5a + Claude Code v2.1.83C-mdoes NOT submit pasted text (confirming the bug)Enterworks identically)🤖 Generated with Claude Code