feat(web): a Stop also cancels the session's background subagents

Merged
CH
11d ago
+9-4

Stacked on #1824.

What changes

Every cancel the host posts to eve now carries tasks: true, which eve's cancel route takes to cancel every background task the session owns, even while the session is parked. A Stop means everything Luke is doing. Without this, a subagent the stopped turn delegated to would keep running, then wake the session with its result.

Not covered: the voice stop key

The voice function reaches eve as the deployment, and the door refuses the deployment on the cancel route on purpose (hosted-brain-host-access.test.ts:451). So today the voice stop key can't cancel a running eve turn, with or without subagents. It only stamps the turn, and a turn's start honours the stamp. Allowing the deployment on /cancel changes the door's security boundary, so this PR leaves it for a separate decision.

Session rotation

The plan had rotation waiting for running children. The host never rotates on its own: a new session opens only when eve retires the old one, and eve cancels the old session's tasks when it finalizes it. So there's nothing to gate.

Tests

  • hosted-eve-sessions.test.ts: a cancel posts { turnId, tasks: true }. Without the change, this test fails.
  • ./scripts/check.sh passes.

šŸ¤– Generated with Claude Code


Open workspace in Conductor