Skip to main content

Error Codes Reference

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.

How to Read Result Codes

Result codes follow HTTP-style groupings:

RangeCategoryMeaning
1xxSuccessThe objective completed successfully.
2xxCancelledThe run was cancelled before completion.
3xxStuckThe agent could not make further progress.
4xxAgent ErrorAn internal agent failure prevented completion.
5xxInfra ErrorA platform or infrastructure issue stopped the run.
6xxBlockerAn external obstacle (CAPTCHA, paywall, etc.) blocked the agent.
7xxAssertion ErrorThe objective's assertions or checkpoints failed.

The run_end event includes both result_code (numeric) and reason_code (descriptive string):

{
"type": "run_end",
"status": "failed",
"result_code": 310,
"reason_code": "stuck.max_steps",
"summary": "Agent reached maximum step limit..."
}

1xx -- Success

100 COMPLETE

FieldValue
Reason codesuccess.complete
StatusCOMPLETE
What happenedAll checkpoints passed and the agent confirmed the objective is achieved.
ActionNone required.

2xx -- Cancelled

200 USER_CANCELLED

FieldValue
Reason codecancelled.user
StatusCANCELLED
What happenedThe run was cancelled by the caller (e.g., Ctrl+C, cancel event, or API cancellation).
ActionNo action required. Re-run the objective if needed.

3xx -- Stuck

The agent ran into a dead end. These are not crashes - the agent recognized it could not make further progress.

310 MAX_STEPS

FieldValue
Reason codestuck.max_steps
StatusSTUCK
What happenedThe agent exceeded the configured --max-steps limit before completing the objective.
ActionIncrease --max-steps (e.g., --max-steps 60), or break the objective into smaller, sequential runs.

320 DAG_CYCLE

FieldValue
Reason codestuck.dag_cycle
StatusSTUCK
What happenedThe agent detected 3 repeated page-state cycles (it keeps returning to the same state after each action).
ActionRephrase the objective with a different approach. The current path leads to a loop - try an alternative navigation route or add explicit intermediate steps.

330 AP_STUCK

FieldValue
Reason codestuck.ap_stuck
StatusSTUCK
What happenedThe action planner determined there are no viable actions available on the current page to progress toward the objective.
ActionManual intervention is needed. Check the screenshot at {session_id}/runs/{run_dir}/run-test/screenshots/ to understand what page state the agent ended on. You may need to adjust the objective, provide credentials, or navigate to a different starting URL.

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

FieldValue
Reason codeagent_error.ap_no_action
StatusERROR
What happenedThe action planner returned 3 consecutive empty decisions (no action selected).
ActionRetry the run. If the error persists, simplify the objective or file a bug report.

420 REASONING_FAILURE

FieldValue
Reason codeagent_error.reasoning_failure
StatusERROR
What happenedAn unhandled exception occurred in the reasoning engine.
ActionCheck {session_id}/runs/{run_dir}/run.log for the full stack trace. Retry the run - this is usually transient. If it persists, file a bug report with the log file.

430 CLEAN_START_INVALID

FieldValue
Reason codeagent_error.clean_start_invalid
StatusERROR
What happenedThe clean_start validation failed - the agent could not establish a valid initial session state (e.g., the starting URL did not load, or the browser context is corrupted).
ActionVerify the --url is accessible and loads correctly. If using --cdp-endpoint, ensure the browser is in a clean state.

440 CHILD_FAILED

FieldValue
Reason codeagent_error.child_failed
StatusERROR
What happenedA child agent (spawned for a sub-objective during analysis) failed. The parent run cannot continue.
ActionCheck the child_agent_end event in the NDJSON output for the child's failure details. Fix the child objective, then re-run the parent.

5xx -- Infra Error

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

510 SCREENSHOT_FAILED

FieldValue
Reason codeinfra_error.screenshot_failed
StatusERROR
What happenedThe browser failed to capture a screenshot (Playwright exception). The agent cannot proceed without visual input.
ActionCheck that the browser is still running. If using --cdp-endpoint, verify the connection is alive. Restart the browser and retry.

520 BROWSER_CRASHED

FieldValue
Reason codeinfra_error.browser_crashed
StatusERROR
What happenedThe browser process crashed or became unresponsive.
ActionRestart the browser and retry the run. If this happens repeatedly, check available system memory and ensure no other processes are competing for resources.

530 TIMEOUT

FieldValue
Reason codeinfra_error.timeout
StatusERROR
What happenedThe run exceeded its configured timeout.
ActionIncrease --timeout (in seconds): --timeout 300. If the objective is complex, break it into smaller runs.

540 EVENT_DISPATCH

FieldValue
Reason codeinfra_error.event_dispatch
StatusERROR
What happenedA custom event dispatch (e.g., browser event injection) failed.
ActionCheck {session_id}/runs/{run_dir}/run.log for the failing event handler. This usually indicates a page script error or an incompatible browser state. Retry the run, and if it persists, file a bug report.

550 CONTROLLER_AUTH

FieldValue
Reason codeinfra_error.controller_auth
StatusERROR
What happenedThe TestMu AI controller returned a 401 Unauthorized response. Your authentication token has expired or is invalid.
ActionRefresh your authentication token:
kane-cli login
# or re-run login with basic auth
kane-cli login --username "undefined" --access-key "undefined"

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

560 CREDITS_EXHAUSTED

FieldValue
Reason codeinfra_error.credits_exhausted
StatusERROR
What happenedThe TestMu AI controller returned a 402 Payment Required response. Your account has no remaining credits for AI agent runs.
ActionPurchase additional credits or upgrade your plan on the TestMu AI billing page. Contact your account administrator if you are on a team plan.

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

FieldValue
Reason codeblocker.captcha
StatusERROR
What happenedThe page presented a CAPTCHA challenge that the agent cannot solve.
ActionSolve the CAPTCHA manually in an interactive session first, then re-run. Alternatively, use a test environment that has CAPTCHAs disabled, or allowlist the test IP.

620 PAYWALL

FieldValue
Reason codeblocker.paywall
StatusERROR
What happenedThe page requires a paid subscription to access the content the objective needs.
ActionProvide credentials for a subscribed account via variables, or test against a non-paywalled environment.

640 BLOCKED

FieldValue
Reason codeblocker.blocked
StatusERROR
What happenedThe target site blocked access (IP ban, WAF rule, geo-restriction, or bot detection).
ActionUse a different IP address, allowlist the test IP on the target site, or use a different test account. Check whether the site has bot-detection that needs to be configured for testing.

650 ERROR_PAGE

FieldValue
Reason codeblocker.error_page
StatusERROR
What happenedThe page returned an HTTP error (404 Not Found, 500 Internal Server Error, etc.) instead of the expected content.
ActionVerify the --url is correct and the target site is operational. Check {session_id}/runs/{run_dir}/run-test/screenshots/ to see the error page.

660 AUTH_NO_CREDENTIALS

FieldValue
Reason codeblocker.auth_no_credentials
StatusERROR
What happenedThe agent encountered a login page but no credentials were provided in the objective or variables.
ActionProvide login credentials using variables:
kane-cli run "Log in and navigate to dashboard" \
--url https://myapp.com/login \
--variables '{"username": {"value": "[email protected]"}, "password": {"value": "s3cret", "sensitive": true}}' \
--agent

7xx -- Assertion Error

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

710 FINAL_VERIFICATION

FieldValue
Reason codeassertion_error.final_verification
StatusASSERTION_ERROR
What happenedThe final checkpoint failed. The agent performed all actions but the end state did not match the expected outcome.
ActionThis means the objective was not achieved. Review the screenshot at {session_id}/runs/{run_dir}/run-test/screenshots/ to see the final page state. The objective itself may need adjustment, or the application under test may have a bug.

720 CHECKPOINT_FAILED

FieldValue
Reason codeassertion_error.checkpoint_failed
StatusASSERTION_ERROR
What happenedAn inline checkpoint (mid-run assertion) failed. The agent detected that an intermediate condition was not met.
ActionCheck which checkpoint failed in the step logs at {session_id}/runs/{run_dir}/run-test/step_N.json. The assertion condition may be too strict, or the application did not reach the expected state at that point.

730 NO_BRANCH_MATCHED

FieldValue
Reason codeassertion_error.no_branch_matched
StatusASSERTION_ERROR
What happenedAn if-else objective had multiple branches, but none of the conditions matched the actual page state.
ActionReview your branching conditions. Add a fallback branch, or check the screenshot to see what state the page was actually in. Adjust conditions to cover the observed state.

Quick Lookup Table

CodeNameReason CodeAction
100COMPLETEsuccess.completeDone
200USER_CANCELLEDcancelled.userRe-run if needed
310MAX_STEPSstuck.max_stepsIncrease --max-steps or simplify
320DAG_CYCLEstuck.dag_cycleTry a different approach
330AP_STUCKstuck.ap_stuckManual intervention needed
410AP_NO_ACTIONagent_error.ap_no_actionRetry the run
420REASONING_FAILUREagent_error.reasoning_failureCheck logs, retry
430CLEAN_START_INVALIDagent_error.clean_start_invalidFix session state
440CHILD_FAILEDagent_error.child_failedCheck child agent details
510SCREENSHOT_FAILEDinfra_error.screenshot_failedCheck browser
520BROWSER_CRASHEDinfra_error.browser_crashedRestart browser
530TIMEOUTinfra_error.timeoutIncrease --timeout
540EVENT_DISPATCHinfra_error.event_dispatchCheck event handler
550CONTROLLER_AUTHinfra_error.controller_authRun kane-cli login
560CREDITS_EXHAUSTEDinfra_error.credits_exhaustedPurchase credits
610CAPTCHAblocker.captchaSolve manually or disable
620PAYWALLblocker.paywallProvide subscription
640BLOCKEDblocker.blockedChange IP or account
650ERROR_PAGEblocker.error_pageFix the URL
660AUTH_NO_CREDENTIALSblocker.auth_no_credentialsProvide credentials
710FINAL_VERIFICATIONassertion_error.final_verificationObjective not achieved
720CHECKPOINT_FAILEDassertion_error.checkpoint_failedCheck assertion condition
730NO_BRANCH_MATCHEDassertion_error.no_branch_matchedUpdate branch conditions

Handling Errors in Agent Mode

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

# Run and capture the result
RESULT=$(kane-cli run "..." --agent --headless 2>/dev/null | tail -1)
CODE=$(echo "$RESULT" | jq -r '.result_code')

case $CODE in
100) echo "Passed" ;;
2*) echo "Cancelled" ;;
3*) echo "Stuck: $(echo $RESULT | jq -r '.reason_code')" ;;
4*) echo "Agent error: retry recommended" ;;
5*) echo "Infra error: check environment" ;;
6*) echo "Blocked: manual intervention needed" ;;
7*) echo "Assertion failed: check test conditions" ;;
esac

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles