acpmux: an adopted chat keeps steering; the TUI offers steer

Merged
TE
16d ago
+75-10

Summary

Steering into a running turn fell back to stopping the turn in two places:

  • A chat adopted after an update restart stopped steering. The steering capability lived only in memory and was set when the agent initialized. A session the daemon adopts after a restart (hub/hosts.rs) never initializes its agent again, so every prompt sent into its turns stopped the turn, and the composer's hint read "⌘↵ to interrupt". It is now kept in the session's meta, and the session starts from it.
  • The acpmux TUI never offered steer. selected_supports_steer (tui/mouse.rs) read agentCapabilities._meta.steering and a list row's agentInfo, and acpmux sends neither. It now reads the session list row's steering field.

This is the first PR of the queue and steer lane. The queue-row actions (Edit, Remove, Send now), attachments in queued prompts and durable delivery for steers follow in separate PRs.

Changelog

  • Fixed: a chat that keeps running across an update restart still steers new messages into its turn instead of stopping it.
  • Fixed: the acpmux TUI offers steer for sessions that support it.

Testing

Each fix's failing test is committed first:

  • cargo test -p acpmux --test durable_agents an_adopted_chat_still_steers_after_an_update_restart: red at 81fd2a8, green at 538c097.
  • The TUI test in c5862e4 (tui/mouse.rs tests): red at c5862e4, green at 5f1c9e1.

Limitation

A chat that is already running when the daemon first updates to this build was saved by the old build without the field, so it still reads as unable to steer until its agent respawns. From the next restart on, adopted chats keep steering. A follow-up can recover it at adoption.

Observed / Not run

  • Observed: I ran both red/green pairs on the fleet earlier in this session. That shell's logs were not carried over, so CI's acpmux tests on this head are the record.
  • Not run: a live dogfood of steering after an update restart.
  • Independent review subagent: PASS, nothing blocking (notes: the first-upgrade gap above; steering is kept in two places that stay in step).
  • CI: the one red, build acpmux x86_64-pc-windows-gnu, fails in owner_only.rs (windows_by_handle), which this PR does not touch. It is a base finding.

Agent session: cosmic-gray

🤖 Generated with Claude Code