interrupt
Stop a runaway SageMath job with SIGINT while keeping session state, or use force to shut down the whole kernel as a last resort when a computation ignores the signal.
Instructions
SIGINT the running computation: the job fails with KeyboardInterrupt and the session KEEPS its state -- the first thing to try for a runaway job. Refused when the running job belongs to another MCP client; a no-op when idle: SIGINT can never kill the kernel. force=true is the last resort instead: stop the whole kernel (graceful shutdown, then SIGTERM, then SIGKILL), losing every session's variables -- for a computation that ignores SIGINT, e.g. a wedged C-level loop. The next exec starts a fresh kernel and says so; if the signal fails the state files are kept and the pid reported, so a live kernel is never orphaned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Stop the kernel itself (all state is lost), not just the job. |