Summary
Cancelling a local console session while it was awaiting a spawn_agents batch returned success, but the session remained working on subsequent reads. The operator ultimately had to kill the local engine and its child process to stop the test, which also took the console offline.
Environment
- Observed November 1, 2026.
- CLI:
0.26.0. - macOS 15.6.1, arm64.
- Local engine accessed through
0 sessionswith--engine-urland--engine-token-env. - Provider: ChatGPT Codex.
- Last visible parent operation:
spawn_agents, with three delegated tasks. - Local source inspected afterward:
3a5bdf3cb39bf7e2a65b5c03f945dc427460737e. This is not a verified build SHA for the installed binary.
Observed sequence
-
0 sessions show <session-id> --engine-url <local-engine-url> --engine-token-env <token-env>reportedstatus: "working". -
The corresponding
0 sessions cancelcommand exited 0. -
The cancellation response still reported
working. -
The event stream recorded this notice at 22:42:32.394 UTC:
Cancellation requested. An executing tool finishes at its next safe boundary; the conversation and authorization remain intact.
-
Repeated status reads, including after an explicit 20-second wait, still returned
working. The event cursor remained at the cancellation notice and its session update. No cancellation completion was observed before termination. -
At the operator's request, the engine process and its child were killed with SIGKILL. The loopback console port then closed.
This is one observed incident, not a deterministic reproduction or proof of an indefinite deadlock. The exact child operation blocking completion has not been identified. Event silence does not establish whether child work was still running or draining.
Expected behavior
A stop request should reach a confirmed stopped state within a documented bound. If a child cannot stop promptly, the interface should expose cancellation progress and a session-level escalation path, without requiring termination of the entire engine.
Investigation pointers
In the inspected source:
packages/cli/src/web/console-gateway.ts:cancel()acknowledges immediately, while the session remainsworkinguntil its turn promise settles. The notice explains safe-boundary cancellation, but there is no distinct cancelling status.packages/cli/src/web/console-gateway.test.ts: existing coverage explicitly permitsworkingduring cancellation teardown.packages/core/src/console/turn-engine.tsandpackages/core/src/agent/tools.ts: the abort signal is passed to tool execution and composed into subagent execution. Missing signal propagation is not an established root cause.spawn_agentsjoins the concurrent batch, and native-loop teardown awaits harness, executor, and plugin cleanup. These are useful places to investigate delayed cancellation.- Subagent progress callbacks suppress events after abort, which can leave the operator with no visible draining progress.
Suggested regression coverage
Use a synthetic local child task that delays or ignores cancellation; no live security scan is needed.
- Verify cancellation reaches a truthful terminal state within the chosen bound, or exposes an actionable timeout.
- Verify pending work does not start after cancellation.
- Verify session-level force stop terminates the relevant child work while keeping the engine and unrelated sessions usable.
- Verify cancellation/draining status is distinguishable from ordinary
working.
Activity
0No activity yet.