Pressing ← right after Enter (same input burst) silently drops the just-submitted prompt — the session idle-forks and no transcript is written
Symptom
Pressing ← immediately after Enter — close enough that both keys arrive in the same stdin read (fast typists, key rollover, remote/SSH batching) — makes the just-submitted prompt disappear: the session backgrounds itself as an empty, idle session, no turn output ever arrives, and no session transcript is written. Only history.jsonl remembers the prompt.
This is a data-affecting variant of the known ←-race family (a fix in this area was previously built and deliberately retracted, so this is a report with a clean repro, not a proposed patch).
Repro (isolated config dir, no credentials needed)
CFG=/tmp/drop-repro; mkdir -p $CFG/cwd
printf '{"hasCompletedOnboarding":true,"theme":"dark"}' > $CFG/.claude.json
tmux new-session -d -s drop -x 170 -y 44 "env CLAUDE_CONFIG_DIR=$CFG IS_DEMO=1 bash"
tmux send-keys -t drop 'cd '"$CFG"'/cwd && claude --debug-file /tmp/drop-repro/debug.txt' Enter # wait for the idle prompt
tmux send-keys -t drop -H 68 65 6c 6c 6f 0d 1b 5b 44 # "hello" + Enter + ← in ONE burst
Observed: within ~400 ms the screen is the agents list (the session idle-forked); the prompt never runs.
The smoking gun (debug log, one run)
16:46:22.590 tengu_feature_ok {"feature_name":"prompt_submit"}
16:46:22.604 tengu_input_prompt {"prompt_length":5,"prompt_source":"typed",...}
16:46:22.674 tengu_api_query {"querySource":"repl_main_thread","messagesLength":2,...}
16:46:22.677 tengu_open_agents_via_left {"was_empty":true,"via":"idle-fork","inflight_count":0}
3 ms after the API query dispatches, the ← handler still classifies the session as empty & idle (pre-submit state) and takes the idle-fork path. Afterwards:
find $CFG/projects -name '*.jsonl'→ nothing (no session transcript was ever created, so the submitted turn and any response are gone);- the forked job (
$CFG/jobs/<short>/state.json) is an empty"(idle - send a prompt to start)"row with a fresh sessionId; history.jsonlcontains the prompt text (the only survivor).
Expected
Either the ← gate observes the in-flight submit (it is neither "empty" nor "idle" 3 ms after tengu_api_query) and routes through the loading path (defer/abort-then-fork), or the fork carries the just-submitted turn with it. Silently discarding a prompt the user watched themselves submit shouldn't be a reachable outcome of two keys that are naturally typed in quick succession.
Versions: reproduced on a 2026-07-04 dev build (sha5230446 lineage); Linux x64 native under tmux. The gesture requires both keys in one stdin read — sending them with any delay behaves correctly, which is why this is easy to hit in real typing but easy to miss in manual testing.