Ir al contenido
#0741
Agent

Cancel the agent's rabbit hole from the lunch line

12:40 PM, in the lunch line, phone in hand. The support agent that ships inside your product has spent nine minutes on one customer's question: the session is alive, just slow.

GET /api/v1/agent/sessions/{id}/tasks shows why: three background subagent tasks, and one has been grinding through a 60,000-line changelog diff. You pull that task's transcript, read enough to recognize the spiral, and POST .../tasks/{tid}/cancel. It's handled at the server layer, so it works mid-turn, without touching the session.

The other two tasks finish. The customer gets their answer at 12:44, minus one detour they never knew about. You get your sandwich.

You didn't kill the agent: you canceled one of its thoughts.