Skip to content

Avoid retyping prompts when sending Enter fails - #4

Open
RexWHuang wants to merge 1 commit into
thomasnormal:mainfrom
RexWHuang:fix/avoid-duplicate-text-on-enter-failure
Open

RexWHuang wants to merge 1 commit into
thomasnormal:mainfrom
RexWHuang:fix/avoid-duplicate-text-on-enter-failure

Conversation

@RexWHuang

Copy link
Copy Markdown

When literal prompt insertion succeeds but sending Enter fails, tmux_send retries the full operation and inserts the prompt a second time. Track whether text was already sent and return the error without retyping it; keep the existing retry for failures before successful insertion.

Add regression coverage for the Enter failure and for a first-write failure followed by a successful write and failed Enter.

Validation:

  • 190 unit tests passed across the Codex helper, loop, manager, log watcher, and real-Codex harness unit suites.
  • bash test/smoke.sh passed using Python 3.11.
  • The new regression failed before the fix with two text writes instead of one.

Real Codex/tmux integration was not run because tmux is unavailable on the test host. Python 3.10 smoke hits an existing StrEnum import failure, which is outside this patch.

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