Skip to content

Fix agent send --enter not submitting#171

Merged
andyrewlee merged 1 commit intomainfrom
enter
Feb 17, 2026
Merged

Fix agent send --enter not submitting#171
andyrewlee merged 1 commit intomainfrom
enter

Conversation

@andyrewlee
Copy link
Copy Markdown
Owner

@andyrewlee andyrewlee commented Feb 17, 2026

Codex (Ink/React TUI) drops an Enter keystroke that arrives in the same event-loop tick as a burst of text input. Add a 50ms delay between delivering text and pressing Enter in SendKeys.

Verified against live Codex sessions:

  • Old binary (0ms delay): 5 rapid sends → 0/5 submitted
  • New binary (50ms delay): 5 rapid sends → 5/5 submitted
  • Claude/Gemini unaffected (work with or without delay)

See tmux/tmux#1778 for prior art: tmux maintainer confirmed the application can eat keystrokes that arrive before it is ready, and the fix is a timing delay.

Summary

Describe the change and intended behavior.

Quality Checklist

  • Ran make devcheck locally.
  • Ran make lint-strict-new locally for changed code.
  • If UI/rendering changed, ran make harness-presets.
  • If tmux/e2e changed, ran go test ./internal/tmux ./internal/e2e.

Open with Devin

Copy link
Copy Markdown
Owner Author

@andyrewlee andyrewlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@andyrewlee andyrewlee force-pushed the enter branch 2 times, most recently from 0cfffd2 to b7c1cde Compare February 17, 2026 22:28
Some coding agents drop an Enter keystroke that arrives in the same
event-loop tick as a burst of text input. Add a 50ms delay between
delivering text and pressing Enter in SendKeys.

Affected agents (Enter dropped with 0ms delay):
- Codex: intermittent — fails under rapid/burst sends
- Cline: consistent — 5/5 Enter keystrokes dropped

Unaffected agents:
- Claude, Gemini, Amp, OpenCode: all handle 0ms fine

See tmux/tmux#1778 for prior art: tmux maintainer confirmed the
application can eat keystrokes that arrive before it is ready, and
the fix is a timing delay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@andyrewlee andyrewlee changed the title Fix agent send --enter not submitting in Codex Fix agent send --enter not submitting Feb 17, 2026
@andyrewlee andyrewlee merged commit b8bd602 into main Feb 17, 2026
4 checks passed
@andyrewlee andyrewlee deleted the enter branch February 17, 2026 22:35
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