Skip to content

CLI reference

incident watch

stacktape incident watch waits for an incident to recover and stay recovered. It exits successfully only after the incident has remained RESOLVED for the stability window; if a signal recurs and reopens the incident, the window resets. Use it after deploying a fix to prove the fix worked, in CI scripts, or at the end of a coding-agent workflow. It needs a Console sign-in: stacktape login, or STACKTAPE_API_KEY in CI.

Usage

stacktape incident watch <incident-id>

By default the command waits up to 900 seconds for the incident to stay resolved for 30 continuous seconds. Recovery time the Console already recorded before the command started counts toward the window.

Examples

Wait up to 30 minutes and require two minutes of stability:

stacktape incident watch inc_abc123def456 \  --timeout 1800 \  --stable-for 120

Emit status events and the final result as JSON for scripts or AI coding assistants:

stacktape incident watch inc_abc123def456 --agent

Exit behavior

The command exits with the error code INCIDENT_WATCH_TIMEOUT if sustained recovery is not observed before the timeout. The message includes the last observed status and the number of signals that were still active, so a script can decide whether to retry after another fix. Raise the timeout and the stability window when the affected monitor evaluates slowly, for example an alarm with a five-minute period.

Options

stacktape incident watch <incident-id>6 options
  • The ID of the incident to act on.

  • If provided, the command will not execute and will instead print help information.

  • Number of continuous seconds the incident must remain resolved before the command succeeds.

    A recurring signal resets the window. Defaults to 30 seconds.

  • --timeoutnumber
    Maximum number of seconds to wait for the incident to recover.

    Defaults to 900 seconds.

  • --log-level"info" | "debug" | "error"
    Log Level

    The level of logs to print to the console.

    • info: Basic information about the operation.
    • error: Only errors.
    • debug: Detailed information for debugging.
  • --quietboolean
    Hide progress, banners, success messages and hints.

    Command output, warnings and errors are still printed.

  • incident show — inspect the current evidence when the watch times out
  • incident resolve — resolve error-only incidents manually before watching for a recurrence
  • incident list — list incidents and find their IDs

See Incidents for the recommended triage and verification workflow.