
What happened
On Claude Code 2.1.319 (macOS 26.3), a SIGINT-stopped claude -p returned exit code 0 in 0.01 seconds across all five runs, while SIGTERM returned 143.
Why it matters
A run that was deliberately halted still looks successful to anything judging by exit code, so code that counts completion that way will overstate finished work; the author's own test double returned 130 and hid the mismatch.
Summaries like this, every morning.
By signing up you agree to the Terms of Service and Privacy Policy.
The author built an agent platform that runs claude -p as a child process and treats long runs as stopped by sending a signal. Reviewing autonomous-run logs, they noticed a run they had stopped carried exit code 0, while their test double returned 130 in the same situation. That mismatch prompted a direct experiment without the platform: Claude Code 2.1.319 on macOS 26.3, haiku, no tools, one turn, the child started in its own process group, and the signal sent one second after the first event.
The measured table shows SIGINT runs ending on their own in 0.01 seconds with exit code 0, and SIGTERM runs returning 143, both after only a system/init event. The author notes that official documentation mentions 143 for SIGTERM but does not document SIGINT's exit code, and says they do not know why 0 appears because they have not read Claude Code's internals. The result event differed between calls: the platform's invocation produced none, while the standalone script produced error_during_execution three times, and the author has not pinned down which argument causes that.
Because of that, the practical rule they land on does not depend on exit code at all: record on the stopping side that a stop happened, and count a run as finished only when a success result event appears. They added two tests with a 0-exiting double, one without a result event and one emitting a success result, and confirmed those tests fail when the check is deliberately broken to look at exit codes, whereas existing tests missed two of three breakages. They list what remains untested, including stopping during tool execution, Linux and other versions, and leftover child processes, and recommend re-running their script after a version upgrade.
Pick your industry and the AI tools you use, and get news related to your work every day.
By signing up you agree to the Terms of Service and Privacy Policy.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
AI browser startup Kernel secured $60 million in Series B funding led by Lightspeed Venture Partners, valuing…

OpenAI and Google Gemini models vanished from Baidu's Token Exchange after Semafor asked about them; OpenAI co…

Anthropic said unreleased Claude models found a theoretical attack on lattice cryptography, solving a 14-year-…

In a Fortune commentary, the cognitive scientist says Claude told her the Post-It framework she sketched “earn…

Interhuman AI launched Inter-2 Deep, which reads tone, facial expression and body language together and writes…
Nvidia unveiled Kyber Galaxy, an orbital AI data center rack about one-third the size of its Vera Rubin NVL72…
