mecatui: queued steer card implies Esc cancels the steer, but it cancels the run and falsely shows the steer as applied
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 152
- Forks
- 16
- Avg merge
- 14h 48m
- Merged PRs (30d)
- 536
Description
Bug description
When a steer is queued during an active mecatui run, its card says esc cancel. Pressing Escape does not cancel/retract the steer: it cancels the active run.
The resulting state is also misleading. Run termination records the pending steer into session history and the TUI renders the steer echo as steer applied, even though the cancelled run performs no subsequent model turn that could process it. The steer is only available in history for a later run.
Steps to reproduce
- Start a prompt in mecatui that keeps the run active long enough to steer.
- Submit another prompt while the run is active.
- Wait for the
steer queued · ↑ edit · esc cancelcard. - Press Escape.
- Observe that the active run is cancelled and the steer appears to have been applied, although the model did not process it.
Expected behavior
The contextual action and resulting status should distinguish clearly between retracting the queued steer and cancelling the active run.
If Escape is intended to cancel the run, the card should say so explicitly, and a steer captured at cancellation should be presented as saved for a future run rather than applied. Alternatively, if esc cancel refers to the card's queued steer, Escape should retract that steer without cancelling the run.
Actual behavior
- The queued-steer card says
esc cancelwithout identifying the run as the cancellation target. - Escape sends a run
Cancelframe and deliberately sends nosteer_cancelframe. - The pending steer is recorded at terminal close and emitted as a steer echo.
- Mecatui renders that echo as a user message with
steer applied, but the cancelled run does not process it.
Environment (if relevant)
- mecatl commit:
ad1cfe3c89a640905b88fb69f9905df498ba5c9c(origin/mainon 2026-09-18) - Deployment shape: mecatui
Additional context
Current tests explicitly pin both sides of this behavior:
cmd/mecatui/ui/steer_test.go:esc cancels without retracting a pending steerengine/agent/steer_test.go:TestSteer_NeverClosedParkedrecords the steer at cancellation so a future run can replay it
The card changed from esc retract to esc cancel when direct run cancellation was introduced in #887.
Focused verification:
go test ./cmd/mecatui/ui -run TestSteer_TUIRendersAuthoritativeState -count=1
cd engine && go test ./agent -run TestSteer_NeverClosedParked -count=1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cmd/mecatui/ui/steer_test.go and engine/agent/steer_test.go, then trace Escape handling and terminal-close history recording in the mecatui and agent steer paths. Clarify whether Escape retracts the steer or cancels the run, and update the card and history status consistently. Run the two focused Go tests named in the issue, adding coverage for the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100