Skip to content

sessions: 🐛 Let the root interrupt its own Orca lane - #321

Merged
yasyf merged 1 commit into
mainfrom
fix/orca-interrupt-own-lane
Oct 6, 2026
Merged

yasyf merged 1 commit into
mainfrom
fix/orca-interrupt-own-lane

Conversation

@yasyf

@yasyf yasyf commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Context: At 8:29 AM on October 6, 2026, the release-v3 drive root ran orca terminal send --terminal term_4137f7d4-… --text 'STOP THE ROLLBACK. …' --interrupt against its own incident lane, dispatch ctx_83a95c65e319 in Run run_7715a23a5657. The lane was mid-turn preparing a rollback the owner had just forbidden. orca_send_ends_session blocked the call with "interrupts or exits the agent in another terminal, which ends that session … leave interrupts and exits to the owner." Ordinary text would only have queued until the lane's turn ended. The owner asked for the hook to be fixed.

Summary: orca_send_ends_session now allows --interrupt when the send names one literal --terminal and the caller is the main session whose ORCA_TERMINAL_HANDLE coordinates the Run of that terminal's dispatch. The guard finds the dispatch with worker_of, the worker-list scan the settled-close lift uses, and checks the coordinator with coordinates(), the same check the 12.88.15 worker-stop lift relies on. Exit text such as exit, /quit, logout, or a control byte stays blocked for everyone with the original message. An interrupt from a lane terminal, an in-process subagent, another Run's coordinator, or a session with no readable worker stays blocked, as does a handle or text named at run time.

Motivation: An --interrupt stops the lane's current turn and delivers the text; it does not end the session. The root already owns the Run and may stop its lanes outright under cc-notes answer edfa70e. Making it wait for the owner to interrupt a lane is a round trip with no safety gained, and here it let a forbidden rollback keep running.

Details: interrupts_own_lane reuses lone_target and spelled from the worker-stop lift; own_lane sits beside own_dispatch in _sessions.py. orca_send_verdict now takes the scan and event so it can probe. The blocked-interrupt message keeps the original first sentence and names the allowed route. inline_worker gained a run parameter for the other-Run test. The inline tests pin the 8:29 AM command verbatim, a send piped to tail followed by a cci post, as an Allow for the coordinating root, plus Blocks for no coordinator handle, a lane terminal, a subagent, another Run, no worker row, --text exit --interrupt, /quit, a "$T" handle, and "$MSG" text.

Context: At 8:29 AM on October 6, 2026, the release-v3 drive root ran `orca terminal send --terminal term_4137f7d4-… --text 'STOP THE ROLLBACK. …' --interrupt` against its own incident lane, dispatch `ctx_83a95c65e319` in Run `run_7715a23a5657`. The lane was mid-turn preparing a rollback the owner had just forbidden. `orca_send_ends_session` blocked the call with "interrupts or exits the agent in another terminal, which ends that session … leave interrupts and exits to the owner." Ordinary text would only have queued until the lane's turn ended. The owner asked for the hook to be fixed.

Summary: `orca_send_ends_session` now allows `--interrupt` when the send names one literal `--terminal` and the caller is the main session whose `ORCA_TERMINAL_HANDLE` coordinates the Run of that terminal's dispatch. The guard finds the dispatch with `worker_of`, the `worker-list` scan the settled-close lift uses, and checks the coordinator with `coordinates()`, the same check the 12.88.15 `worker-stop` lift relies on. Exit text such as `exit`, `/quit`, `logout`, or a control byte stays blocked for everyone with the original message. An interrupt from a lane terminal, an in-process subagent, another Run's coordinator, or a session with no readable worker stays blocked, as does a handle or text named at run time.

Motivation: An `--interrupt` stops the lane's current turn and delivers the text; it does not end the session. The root already owns the Run and may stop its lanes outright under cc-notes answer edfa70e. Making it wait for the owner to interrupt a lane is a round trip with no safety gained, and here it let a forbidden rollback keep running.

Details: `interrupts_own_lane` reuses `lone_target` and `spelled` from the `worker-stop` lift; `own_lane` sits beside `own_dispatch` in `_sessions.py`. `orca_send_verdict` now takes the scan and event so it can probe. The blocked-interrupt message keeps the original first sentence and names the allowed route. `inline_worker` gained a `run` parameter for the other-Run test. The inline tests pin the 8:29 AM command verbatim, a send piped to `tail` followed by a `cci post`, as an Allow for the coordinating root, plus Blocks for no coordinator handle, a lane terminal, a subagent, another Run, no worker row, `--text exit --interrupt`, `/quit`, a `"$T"` handle, and `"$MSG"` text.

Claude-Session-Id: 900424b6-7393-480c-a26a-f1bd21da6e57
@yasyf
yasyf merged commit 1d34a48 into main Oct 6, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant