Skip to content

fix(chat): a mid-turn send on a provider that cannot steer stops the run instead of trailing behind it - #14

Merged
leonardoxr merged 1 commit into
main-xavierfrom
fix/omp-mid-turn-stop-and-send
Aug 19, 2026
Merged

fix(chat): a mid-turn send on a provider that cannot steer stops the run instead of trailing behind it#14
leonardoxr merged 1 commit into
main-xavierfrom
fix/omp-mid-turn-stop-and-send

Conversation

@leonardoxr

Copy link
Copy Markdown
Owner

Problem (reproduced from the event log, not from theory)

A message sent while an omp turn ran appeared delivered and reached the agent 29 minutes later, when the running turn finally ended:

14:09:35  turn-start-requested   ← the queued card's arrow, mid-turn
14:38:xx  …the agent finally sees it, inside the old turn

omp over ACP has no steering surface — a concurrent session/prompt makes the agent cancel the running turn (acp-agent.ts prompt()) — and T3's own prompt serialization (AcpSessionRuntime, one permit per session) held the message behind the in-flight prompt while the timeline claimed delivery. #10 routed Enter to the follow-up queue, but left two doors open: the queued card's "send now" and the explicit send-now chord, which it silently downgraded to a queue so the keybinding looked dead.

Fix

Adapter (the transport's truth, so every client inherits it). OmpAdapter.sendTurn stops the run before a mid-turn prompt and sends the message as its own turn: the agent has it in about a second, with the transcript intact. If a prompt slot survives the stop, it fails loudly rather than queueing behind it. The fake "steer" branches that reused the running turn id are gone.

Composer. Enter under "steer" still queues — nobody asked to destroy a run by pressing Enter — but the explicit send-now chord and the card's arrow send for real again. Both say what they now do: "Stop the run and send", "Stop the run and answer this next".

Verification

  • New adapter test stops the running turn for a mid-turn prompt instead of trailing behind itfails on main-xavier (2s timeout: the silent hold), passes here; asserts [old:cancelled, new:completed] and distinct turn ids.
  • OmpAdapter + OmpProvider + apps/web/src/components/chat: 295 tests green. tsgo clean on server and web; lint/format clean.

Not included: before/after images for the copy change. AGENTS.md asks before driving a browser and I do not have that go-ahead — say the word and I will add them.

Built with Claude Opus 5 on Oh My Pi.

…run instead of trailing behind it

omp over ACP has no steering surface: a concurrent session/prompt makes the
agent cancel the running turn, and T3's own prompt serialization otherwise held
the message behind the running prompt — in one reproduction, 29 minutes — while
the timeline claimed it was delivered.

The adapter now stops the run before a mid-turn prompt and sends the message as
its own turn, so it reaches the agent in about a second, and the fake "steer"
branches that reused the running turn id are gone. The composer keeps Enter off
that destructive path (under "steer" it queues, as before), but the explicit
send-now chord and the queued card's arrow send for real again instead of being
silently downgraded to a queue, and both say what they do: "Stop the run and
send", "Stop the run and answer this next".

Built with Claude Opus 5 on Oh My Pi.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Aug 19, 2026
@leonardoxr
leonardoxr merged commit 336cd8c into main-xavier Aug 19, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant