Skip to content

acpmux: another agent's steer waits behind the person's queued prompt - #28700

Merged
cmux-bot[bot] merged 5 commits into
feat-cmux-nextfrom
lane/ao-agent-steer-waits
Oct 31, 2026
Merged

cmux-bot[bot] merged 5 commits into
feat-cmux-nextfrom
lane/ao-agent-steer-waits

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-29: "but like until the acpmux fixes get into the app your turns almost never "end"" and "but even if im just queueing, your turn should still be ending. we went over how there's some sort of "never end" bug in acpmux here"; earlier that night: "im the only one that steers... shouldn't some of these messages like... you can turn on steer or queue or whatever?"

What was wrong

#27686 sent another agent's plain send to the chat's inbox, and an inbox notice steers in only while no prompt waits behind the running turn (inbox.rs notice_held). Some agent steers are not inbox items: a peer's or the mesh relay's forward, a team message, a correction under a supersede key, a steer-only send, a cmux agent message, a lane report. Those still passed the gate in turns.rs (steer && steering && running && !capped && !notice_held && !review_held) while the person's prompt sat in the queue. Each one kept the running turn going, so the person's queued prompt kept waiting.

What changed

  • turns.rs: if another agent's steer arrives (from_agent: an agent sender and not Send now) while one of the person's prompts waits behind the running turn (inbox::persons_prompt_waits: an unheld queue entry with no agent sender), it queues behind that prompt. If it was sent with interrupt, it stops nothing and does not jump ahead of the person's prompt. A steer-only one is refused: steer.unavailable, data.promptWaits: true. The review-box and turn-cap refusals still come first.
  • steer_end.rs: the same check runs again as the steer is written, inside the input handoff that acpmux: review boxes get no inbox notice and no other agent's steer #28369 added for review boxes. If the person queued a prompt in between, the steer falls back to the queue, the way the review-box check falls back. A steer-only one logs steer_withdrawn and is refused with promptWaits.
  • inbox.rs: the module doc now states the rule; it adds persons_prompt_waits and the refusal text.

These still go in, as before:

  • the person's own steer;
  • the queue's Send now;
  • an inbox digest that its drain asked to steer (a_digest_steers_once_into_the_running_turn_of_an_agent_that_steers expects this while the person's prompt waits);
  • an agent steer while only other agents' messages wait. subsessions_delivery expects a grandchild's steer to go in while the parent's after_turn message waits.

Where a held steer goes next: it waits in the queue behind the person's prompt (queue.rs enqueue puts agent messages after the person's). It then runs as a turn of agent messages after that prompt, and other agent messages waiting there join it (digest.rs). A restart rebuilds it as an ordinary queued entry. A review box already held agent steers, and that is unchanged. Turn-cap behaviour is unchanged.

Risk

Medium-low. The change only narrows when another agent's steer goes in: it is held while the person's own prompt waits. Nothing the person sends is affected. If a steer-only agent client (for example the Chief delivering between tool calls) hits this case, it now gets a refusal it already handles (steer.unavailable).

Tests (red first)

Added in tests/hub_integration/agent_inbox.rs:

  • another_agents_steer_waits_behind_a_queued_prompt: a team message and an interrupting team message both queue behind the person's prompt, a steer-only one is refused with "a prompt waits", nothing steers into the running turn, and the turn ends end_turn.
  • another_agents_steer_goes_in_when_no_prompt_waits: with nothing queued, a team message and a steer-only one still steer in.
  • the_persons_steer_goes_in_while_a_prompt_waits.

Red at the test commit e93ad5b (cmux-ci run 41155307523, cargo test -p acpmux --test hub_integration -- agent_inbox::): another_agents_steer_waits_behind_a_queued_prompt ... FAILED (agent_inbox.rs:294: the team message steered in, queued was false); the other two new tests pass on base, as intended; 13 passed; 1 failed.

Green at head 57bdcfc:

  • cargo test -p acpmux --test hub_integration -- agent_inbox:: steer_only:: inbox_digest:: turn_cap carried_turns:: stop::: 74 passed; 0 failed (run 41159680306)
  • cargo test -p acpmux --test subsessions_delivery --test send_steer --test lane_reports --test send_async: 20 + 16 + 5 + 1 passed, 0 failed
  • cargo test -p acpmux --lib -- hub::: 797 passed; 0 failed; 4 ignored

Review: two rounds, Codex gpt-6-astra (high, fast), independent. Round 1 blocked on the steer-only refusal when the person's prompt overtakes the steer at write time; fixed in 57bdcfc. Round 2: SHIP at 57bdcfc.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 3 commits October 31, 2026 00:46
Red on base: a team message (another agent's steer that is no inbox item)
steers into the running turn while the person's prompt waits behind it, so
that turn runs on past the prompt; an interrupt one stops the turn and goes
ahead of the person's prompt. With nothing waiting it still steers in, and
the person's own steer still goes in while their prompt waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-cc29b9c4eab06fb487c2
A steer from another agent that is no inbox item (a peer's or the mesh
relay's forward, a team message, a correction under a supersede key, a
steer-only send, a cmux agent message, a lane report) steered into the
running turn even while the person's prompt waited behind it, so that turn
ran on past the prompt. It now follows the notices' rule: while one of the
person's prompts waits it queues behind it, one sent with interrupt stops
nothing, and a steer-only one is refused (steer.unavailable, promptWaits).
Checked at dispatch and again as the steer is written. The person's own
steer, the queue's Send now and an inbox digest its drain asked to steer
still go in; other agents' queued messages hold no steer, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-cc29b9c4eab06fb487c2
…e says promptWaits

Review (BLOCK at 3718040): a steer-only agent steer held as it is written,
because the person queued a prompt meanwhile, answered the generic
no-turn error and left its logged user_message unanswered in the log. It
now logs steer_withdrawn and is refused with promptWaits, as at dispatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-cc29b9c4eab06fb487c2
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high fast, independent): SHIP at 57bdcfc

Round 1 (BLOCK at 3718040): a steer-only agent steer that the person's prompt overtook at write time answered with the generic no-turn error; fixed in 57bdcfc (it now logs steer_withdrawn and is refused with promptWaits). The write-time window was accepted: the check runs under the same input handoff as the notice and review-box checks. Round 2: no blockers remain.

@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Reds at 57bdcfc, both base reds:

  • clippy (changed cmux-tui packages): the panic ratchet is over for acpmux (arithmetic_side_effects 1493 > 1430, cast_possible_truncation 222 > 215), and also for cmux-tui (1189 > 1188) and cmux-tui-core (884 > 875), which this PR does not touch. Its added non-test lines (turns.rs, inbox.rs, steer_end.rs) have no arithmetic, casts, indexing or slicing; they are only booleans and calls. These counts were already over on base.
  • nightly-guards / workflow-guard-tests / release-notary: a known base red; its annotations are about pool snapshot 403s, a full disk and publish metadata, and nothing that touches acpmux.

Own tests at this head pass: hub_integration agent_inbox/steer_only/inbox_digest/turn_cap/carried_turns/stop (74 passed), subsessions_delivery/send_steer/lane_reports/send_async (42 passed), lib hub:: (797 passed).

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 7e2c2c9: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr28700 -f ref=lane/ao-agent-steer-waits -f platform=macos -f backend_mode=local

Shipped in:

@teamleaderleo

teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review (the owner lane's independent review, at its land request): SHIP at ca73a7e

Recorded by lane-gh-broker from this PR's owner lane, which asked to land this exact head after its independent review. next-autoland lands it once every red is the base's; a BLOCK at this head, a HOLD line or a hold label still stops it.

@cmux-bot
cmux-bot Bot merged commit 99a132d into feat-cmux-next Oct 31, 2026
249 of 251 checks passed
@cmux-bot
cmux-bot Bot deleted the lane/ao-agent-steer-waits branch October 31, 2026 17:37

This branch was previously deployed

3 inactive deployments
artifacts — ca73a7e7 Deployed Oct 31, 2026 by teamleaderleo via add the Windows daemon to the tree #90568
ci-routing-agent — ca73a7e7 Deployed Oct 31, 2026 by github-actions[bot] via cmux-next macOS placement #54892
sentry-dsyms — ca73a7e7 Deployed Oct 31, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #90568
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant