-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
acpAgent Client Protocol integrationAgent Client Protocol integrationenhancementNew feature or requestNew feature or requestsize/M
Milestone
Description
Parent Epic
Problem
cancel() is currently a no-op. The agent loop continues running after IDE sends cancel, wasting resources and blocking the session.
Solution
- Add
CancellationToken(tokio-util) toSessionEntry - Create token on
new_session, store in session map cancel()callstoken.cancel()- Agent loop checks
token.is_cancelled()between LLM calls and tool executions prompt()drain loop selects on token cancellation, returnsStopReason::Cancelled- Wire through
LoopbackChannelor as separate signal
Critical Path
Depends on: #779 (AcpContext wiring — agent loop must be ACP-aware)
Blocks: nothing directly, but required for responsive IDE UX
Acceptance Criteria
-
CancellationTokenstored per session -
cancel()triggers token - Agent loop exits promptly on cancellation
-
prompt()returnsStopReason::Cancelled - Integration test: prompt → cancel → verify cancelled response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acpAgent Client Protocol integrationAgent Client Protocol integrationenhancementNew feature or requestNew feature or requestsize/M