Required by the spec since #39. This is debt against the spec, not new scope.
What the spec requires
A4: the operator command stop works in every state, for every agent. It ends the current turn or delegation at the next tool boundary, unmounts elevated MCP instances (not applicable to nisse-dev), and moves to AWAIT_INPUT. The unfinished work is then handled like any other halt, on the operator's word.
B2:stop is in the operator command list.
What we have
There's no stop command.
The agent can't hear one while it's working. Planning turns, milestone execution, and review-comment handling all run synchronously inside the transport callback, holding the orchestrator lock. The Matrix sync loop calls that callback, so no new messages are read until the work finishes. Adding the command alone would do nothing, because it would arrive after the work it was meant to stop.
Work
Move work off the transport thread, so inbound messages keep arriving while the agent works.
A cancellation signal that stop sets straight away, without waiting for the running work.
The executor, delegation, and planner loops check it at each tool boundary and return a defined "stopped" outcome.
The orchestrator moves to AWAIT_INPUT and says what was stopped and what the operator can do next.
stop with nothing running replies that nothing is running.
Acceptance
Tests show stop halting a running milestone, a running delegation, and a planning turn, each at a tool boundary, ending in AWAIT_INPUT.
A test shows transport messages still delivered while work runs.
Required by the spec since #39. This is **debt against the spec**, not new scope.
### What the spec requires
- **A4:** the operator command `stop` works in every state, for every agent. It ends the current turn or delegation at the next tool boundary, unmounts elevated MCP instances (not applicable to `nisse-dev`), and moves to `AWAIT_INPUT`. The unfinished work is then handled like any other halt, on the operator's word.
- **B2:** `stop` is in the operator command list.
### What we have
- There's no `stop` command.
- **The agent can't hear one while it's working.** Planning turns, milestone execution, and review-comment handling all run synchronously inside the transport callback, holding the orchestrator lock. The Matrix sync loop calls that callback, so no new messages are read until the work finishes. Adding the command alone would do nothing, because it would arrive after the work it was meant to stop.
### Work
- Move work off the transport thread, so inbound messages keep arriving while the agent works.
- A cancellation signal that `stop` sets straight away, without waiting for the running work.
- The executor, delegation, and planner loops check it at each tool boundary and return a defined "stopped" outcome.
- The orchestrator moves to `AWAIT_INPUT` and says what was stopped and what the operator can do next.
- `stop` with nothing running replies that nothing is running.
### Acceptance
- Tests show `stop` halting a running milestone, a running delegation, and a planning turn, each at a tool boundary, ending in `AWAIT_INPUT`.
- A test shows transport messages still delivered while work runs.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Required by the spec since #39. This is debt against the spec, not new scope.
What the spec requires
stopworks in every state, for every agent. It ends the current turn or delegation at the next tool boundary, unmounts elevated MCP instances (not applicable tonisse-dev), and moves toAWAIT_INPUT. The unfinished work is then handled like any other halt, on the operator's word.stopis in the operator command list.What we have
stopcommand.Work
stopsets straight away, without waiting for the running work.AWAIT_INPUTand says what was stopped and what the operator can do next.stopwith nothing running replies that nothing is running.Acceptance
stophalting a running milestone, a running delegation, and a planning turn, each at a tool boundary, ending inAWAIT_INPUT.