Skip to main content
Every Kane CLI run ends with a result_code in the run_end event. This page lists every code, explains what triggered it, and tells you what to do next.
result_code explains why a run stopped. The process exit code (0 to 3) is what gates CI. An early refusal can exit without a run_end event, so always check the process exit code too. See Process Exit Codes.

How to Read Result Codes

Result codes follow HTTP-style groupings: The run_end event includes both result_code (numeric) and reason_code (descriptive string):

1xx: Success

100 COMPLETE


2xx: Cancelled

200 USER_CANCELLED


3xx: Stuck

The agent reached a dead end. These are not crashes: the agent recognized that it could not make further progress.

310 MAX_STEPS

320 DAG_CYCLE

330 AP_STUCK


4xx: Agent Error

An internal agent component failed. These typically indicate a transient issue or a problem with the session state.

410 AP_NO_ACTION

420 REASONING_FAILURE

430 CLEAN_START_INVALID

440 CHILD_FAILED


5xx: Infra Error

Platform or infrastructure failures. These are independent of the objective itself.

510 SCREENSHOT_FAILED

520 BROWSER_CRASHED

530 TIMEOUT

540 EVENT_DISPATCH

550 CONTROLLER_AUTH

Verify with kane-cli whoami, then retry the run.

560 CREDITS_EXHAUSTED


6xx: Blocker

An external obstacle on the target website prevented the agent from completing the objective. These are not agent bugs: they require changes to the environment or objective.

610 CAPTCHA

620 PAYWALL

640 BLOCKED

650 ERROR_PAGE

660 AUTH_NO_CREDENTIALS


7xx: Assertion Error

The agent completed its actions but one or more assertions or checkpoints did not pass.

710 FINAL_VERIFICATION

720 CHECKPOINT_FAILED

730 NO_BRANCH_MATCHED


Quick Lookup Table


Process Exit Codes

kane-cli run exits with one of these codes. Use them to gate downstream CI steps.
  • An unresolved-variable warning (code: "unresolved_variables") does not change the exit code. A step that fails on the literal {{name}} text still fails the run.
  • Under run --analyzer-only, exit 0 means all conditions were judged, not that all are true. Exit 1 means a result was missing, and 3 means cancelled.
  • testmd run, testrun run, generate and the assurance commands have their own exit code tables. See CLI Reference: Exit Codes.

Handling Errors in Agent Mode

When consuming Kane CLI output programmatically, use result_code ranges to determine your next action: