kimi-code/packages/agent-core/test/utils
Kai 933cf6727e
fix(agent-core): surface user interruptions to the model instead of a neutral abort (#236)
When the user interrupts running tools or parallel subagents, the tool_result
fed back to the model was a neutral `Tool "X" was aborted` or a weak "stopped by
the user", so the model treated it as a system fault and speculated about
capacity/concurrency limits instead of recognizing a deliberate stop.

Carry a UserCancellationError as the AbortSignal reason from the cancel sites
(Turn.cancel/abortTurn, SessionSubagentHost.cancelAll) through to the message
sites (tool-call settle paths and the AgentTool catches), which now emit an
explicit "deliberate user action, not a system error/timeout/capacity limit"
message. Aborts propagated from another signal (e.g. a subagent's deadline via
waitForCurrentTurn) carry their original reason, so a timeout is not mislabeled
as a user interruption. The telemetry outcome classifier matches the new
"manually interrupted" phrase to keep counting these as cancelled.
2026-05-30 09:53:21 +08:00
..
abort.test.ts fix(agent-core): surface user interruptions to the model instead of a neutral abort (#236) 2026-05-30 09:53:21 +08:00
completion-budget.test.ts fix: avoid local completion budget truncation (#85) 2026-05-26 22:25:15 +08:00
hero-slug.test.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
per-id-json-store.test.ts feat(agent-core): add session-scoped cron tools with persistence (#157) 2026-05-28 21:05:46 +08:00