Description
When a user cancels the first turn while the sandbox is still initializing, the turn does not cancel promptly because the cancellation signal is not propagated to the sandbox initialization methods.
This is separate from sandbox exec cancellation addressed in #407.
Steps to reproduce
- Start a new conversation that requires a sandbox.
- Cancel the first turn while the sandbox is still initializing.
- Observe that cancellation takes time to complete.
Expected behavior
The cancellation signal should be propagated through the sandbox initialization flow so that cancelling the first turn stops initialization promptly.
Actual behavior
Sandbox initialization does not currently receive the cancellation signal, causing cancellation to be delayed.
Acceptance criteria
- Pass the cancellation signal to the relevant sandbox initialization methods.
- Cancelling during first-turn initialization completes promptly.
- Normal sandbox initialization remains unaffected when no cancellation is requested.
- Add test coverage for cancellation during initialization.
Description
When a user cancels the first turn while the sandbox is still initializing, the turn does not cancel promptly because the cancellation signal is not propagated to the sandbox initialization methods.
This is separate from sandbox
execcancellation addressed in #407.Steps to reproduce
Expected behavior
The cancellation signal should be propagated through the sandbox initialization flow so that cancelling the first turn stops initialization promptly.
Actual behavior
Sandbox initialization does not currently receive the cancellation signal, causing cancellation to be delayed.
Acceptance criteria