-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Bug: provider login input is corrupted inside tmux (suffix-cascade duplication) #2550
Copy link
Copy link
Closed
Description
Summary
When running forge provider login openai_responses_compatible inside tmux, fast typing/paste in the OPENAI_URL prompt causes deterministic text corruption (suffix-cascade duplication).
Outside tmux, the same input behaves normally.
Environment
- Forge:
1.32.1 - tmux:
3.6a - OS: macOS (darwin)
- Shells tested in tmux:
zsh,bash
Minimal Reproduction
- Start a clean tmux server (no user config):
tmux -L repro -f /dev/null new-session
- Run:
forge provider login openai_responses_compatible
- At
? Enter OPENAI_URL:, paste or quickly injectabcd.
Expected
Input remains exactly abcd.
Actual
Input is corrupted as:
? Enter OPENAI_URL: abcdbcdcdd
For long strings/URLs, it becomes a visible suffix-cascade (original + shifted suffixes), e.g. http://... followed by ttp://..., tp://..., etc.
Additional Evidence
- Reproduces with clean tmux (
-f /dev/null), so this is not user tmux config specific. - Toggling tmux options did not resolve:
allow-passthrough,xterm-keys,assume-paste-time. - Changing
TERM/TERM_PROGRAMdid not resolve. - Slow per-character typing works; rapid input/paste triggers corruption.
Suspected Area
Potential redraw/cursor accounting issue in Forge interactive prompt rendering under tmux burst input.
Relevant code path:
crates/forge_select/src/select.rs- Theme sets
prompt_suffixto an ANSI cursor move (cursor::MoveLeft(1)), which may cause non-idempotent redraw behavior in this path.
Why this seems Forge-side (not tmux config)
- Reproduces in clean tmux server with default config.
- Corruption pattern is structured (suffix-cascade), consistent with prompt redraw logic rather than random terminal noise.
If helpful, I can provide a short screen recording and exact command transcript.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels