Free tools Windows power users keep installed
One-click scans. No signup required.
In an interactive terminal, Claude Code is done with its current response when it stops responding and control returns to your terminal prompt. In a script, check the command’s exit status to learn whether the run reported success or failure. Neither signal proves the resulting code is correct: inspect the changes and run the relevant project checks.
What “done” means
There are three different signals to keep separate:
- Completion: the current response or process has ended.
- Command success: the process reports a successful exit status.
- Correctness: the result meets your requirements and works as intended.
A response ending tells you the interaction has stopped; a successful exit status tells an automation script that the command reported success. Neither independently verifies the quality of the code or confirms that tests pass.
In an interactive terminal
Watch for Claude to finish its response and for control to return to the terminal prompt. That is a practical cue that the current turn has ended, though terminal integrations may present activity differently.
#1 Best Overall
If you step away while a task runs, Anthropic documents optional completion alerts, including a terminal bell, iTerm2 system alerts, and custom notification hooks. The iTerm2 instructions are specific to that terminal; use the current settings for your own terminal application and operating system. See Anthropic’s terminal setup guidance.
In scripts and automation
Use print mode (-p) for non-interactive calls, and branch on the command’s exit status instead of assuming success because output appeared. Anthropic’s SDK example checks whether claude -p succeeded and reports the exit code on failure. The exact handling depends on your script; the key is to test the status returned by the process. See the Claude Code SDK documentation.
Rank #2
The CLI reference documents these invocation and output choices:
-pruns Claude Code in print mode.- Print mode can produce JSON or stream-JSON output for machine processing.
--verboseshows full turn-by-turn output, which can help you see what is happening during a run.
These options affect how you invoke or observe a run; they do not guarantee that the task succeeded or that its result is correct. For details, see the Claude Code CLI reference.
Rank #3
Verify the result after Claude finishes
Once the response or process has ended, review the changed files and compare them with the request. Then run the project’s relevant tests, build, lint, or other checks where appropriate. Treat those checks—and your review—as evidence about the work, not the fact that the terminal returned to a prompt or the command exited successfully.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




