fix(coding-agent): interrupt cell on timeout instead of killing kernel
A per-cell timeout used to kill the persistent Python kernel, losing all session state. The kernel.ts timeout path now sends SIGINT first (letting the cell raise KeyboardInterrupt) and only escalates to shutdown after a 5s grace window if the interrupt is ignored. KernelExecuteResult gains an optional kernelKilled flag (defaulting to false, propagated by the escalation timer and the unexpected-exit handler). executor.ts formats two distinct timeout annotations: one that says the kernel is still alive and reset:true would clear state, one that says the kernel was killed and will be recreated.
This commit is contained in:
@@ -75,7 +75,7 @@ describe("executePythonWithKernel", () => {
|
||||
|
||||
expect(result.exitCode).toBeUndefined();
|
||||
expect(result.cancelled).toBe(true);
|
||||
expect(result.output).toContain("Command timed out after 4 seconds");
|
||||
expect(result.output).toContain("eval cell timed out after 4s");
|
||||
});
|
||||
|
||||
it("returns cancelled result without timeout annotation", async () => {
|
||||
|
||||
Reference in New Issue
Block a user