Skip to content

Abort Command

sequant abort stops a running sequant run from another terminal. Use it when the run is headless (started from a script, cron, the MCP server, or a terminal you no longer have), or when it has stopped responding to sequant prompt.

Terminal window
sequant abort 42 # stop the run working on issue #42
sequant abort # stop the only active run (fails if there are several)

The command finds the run’s process ID and signals it directly, escalating until the process exits:

  1. SIGINT, then waits up to the grace period (10 seconds by default). This is the same as pressing Ctrl-C in the run’s terminal: the run’s normal shutdown cleanup runs.
  2. SIGTERM if the run is still alive, then waits 3 seconds.
  3. SIGKILL if it is still alive, then waits 2 seconds. SIGKILL skips all cleanup, so check sequant status afterwards.

On success it prints Aborted #42 (PID 12345, SIGINT)., naming the signal that stopped the run.

OptionEffect
[issue]Issue number to stop. Optional when exactly one run is active.
--grace <seconds>How long to wait after SIGINT before escalating. Default 10; 0 escalates at once.
--forceSkip SIGINT and start at SIGTERM.
--jsonPrint one JSON object: {"ok": true, "issue": 42, "pid": 12345, "signal": "SIGINT"}.
MessageExit codeMeaning
Aborted #42 (PID …, SIGINT).0The run stopped.
PID … for #42 is already dead.0Nothing to stop; the run had already exited.
No relay PID found for #42. Is the run active?1No running process is recorded for that issue. See below.
Failed to abort #42: PID … still alive after SIGKILL.1The process survived every signal. Stop it with your OS tools.

abort reads the process ID that the run’s relay records when an issue starts. The relay is on by default. If the run was started with --no-relay, or with "run": { "relay": false } in .sequant/settings.json, no ID is recorded and abort reports No relay PID found. In that case stop the run with Ctrl-C in its terminal, or find the process with ps and send it SIGINT yourself.

  • sequant status shows where each issue stopped.
  • The issue’s branch is always kept. Its worktree is kept if it has uncommitted changes, commits not yet on the base branch, or a phase that was still running; otherwise the shutdown removes it and the branch is all that remains. The run logs which case applied (Worktree for #42 preserved (…) or removed (clean)).
  • After SIGKILL no cleanup runs, so the worktree is left exactly as it was.
  • To continue, run the issue again with sequant run 42. For runs that stopped on a rate limit rather than an abort, see Halt and Resume.
  • sequant prompt <issue> --type abort asks the running agent to stop by itself, through the relay inbox. Prefer it when the run is healthy; abort is for when it isn’t.
  • Run Command
  • State Command