October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

How to Know When Claude Code Is Done

A returned terminal prompt is a practical completion cue. For scripts, check the exit status—and review the changes and run relevant checks before trusting the result.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

The CLI reference documents these invocation and output choices:

  • -p runs Claude Code in print mode.
  • Print mode can produce JSON or stream-JSON output for machine processing.
  • --verbose shows 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.