Troubleshooting
Use this reference to match an error code, HTTP status, or symptom to its cause and fix. With --json, CLI errors print one JSON line ({"error": {...}}) with code, message, hint, exitCode, and often reason. CLI exit codes are 1 (tool error), 2 (configuration or usage), 3 (sign-in), 4 (network), 5 (input required), 6 (wait timed out), and 130 (interrupted). MCP tool errors include code and error.
Trace ingest errors
When traces don’t appear in Runtype, test the OpenTelemetry Protocol (OTLP) endpoint, API key, and content type with an empty JSON export:
Replace rt_YOUR_TELEMETRY_KEY with your telemetry API key or product ingest key. Runtype returns HTTP 200 with {} when it accepts the request.
OTLP status and rejection codes
The following table lists the HTTP status codes and rejection codes that the OTLP endpoints return:
Runtype accepts or rejects each trace whole. When every trace fails with different causes, Runtype returns 400. When some traces succeed and others fail, Runtype returns 200 with an OTLP partial_success naming the rejected traces.
Your exporter retries 429 and 503 after the Retry-After delay. Retried exports don’t duplicate runs or spans. A 200 response means Runtype accepted the export, and it can take a short time to appear in Logs.
Compatibility ingest (POST /v1/executions/ingest) uses the same statuses, with three differences: a product ingest key returns 403, an executionId that starts with otel- or exceeds the eight-day update window returns 409, and a storage failure returns 500 (safe to retry).
Common trace symptoms
The following list matches common telemetry symptoms to their causes and fixes:
- A run stays in flight (
running): Runtype didn’t receive the closinginvoke_agentspan because a short-lived script or serverless handler exited before sending its spans. Callsdk.shutdown()orprovider.forceFlush()before exit. For examples, see Instrument a supported framework. - An attributed trace appears in Logs with no run: The trace contains no GenAI operation (
invoke_agent,chat,execute_tool) or model telemetry. Check that your instrumentation loads before the agent runs. - Token counts and cost are doubled: Two instrumentations export the same run to Runtype. Point only one instrumentation at Runtype.
- Runtype discards OTLP log records:
LogRecordentries withoutruntype.agent.idorx-runtype-agent-idreturn200partial_successand aren’t stored. Set one of those values on your logs pipeline.
Inspect ingest health
When accepted exports don’t appear in Logs, inspect ingest health with an API key that has ANALYTICS:READ or AGENTS:READ. A TELEMETRY:WRITE key receives 403.
Send a GET request to check ingest health over the last 30 days:
Replace rt_YOUR_READ_API_KEY with an API key that has ANALYTICS:READ or AGENTS:READ. To inspect one trace, append ?traceId=YOUR_HEX_TRACE_ID, where YOUR_HEX_TRACE_ID is 1 to 32 lowercase hexadecimal characters. For every response field, see the API Reference.
The following table describes each status value:
First-trace check failures
Run npx @runtypelabs/connect check or call check_first_trace after one development run of your agent. After applying a fix, pass the ISO 8601 time before that run as --since or since so the check ignores older runs.
Check statuses and CLI exit codes
The following table lists each overall status value and exit code from check:
An unknown check outcome and a failed optional end_user_id check don’t fail the overall status. A warn outcome makes the status degraded: the content check warns with reason withheld_by_app when the app declares with runtype.content.capture that it keeps conversation content out of its traces and the run carries none, so the traces are below the fidelity Runtype needs.
Failing check IDs and reason codes
The following table lists each check ID from check_first_trace, its failing reason codes, and how to fix each one:
Unknown check reason codes
An unknown outcome means the examined run couldn’t prove whether the check passed or failed. The following table lists the unknown reason codes:
Setup findings from doctor
Run npx @runtypelabs/connect doctor to inspect your repository setup without changing files. The command exits with 0 when no check fails (warnings are allowed), 1 when a check fails, 3 when sign-in is refused, and 4 when the traces URL or the ingest key check can’t reach Runtype or gets an unexpected HTTP status.
The following table lists every check ID from doctor, its findings, and how to resolve them:
Repository setup, sign-in, and claim errors
The following tables list errors and reason codes from init, login, claim, sync, and uninstall (invoked with npx @runtypelabs/connect).
Repository setup and session refusals from init
The following table lists the reason codes and refusals from init, init --no-browser, sync, and uninstall:
Claim and unclaimed-organization errors
An organization created with init --no-browser must be claimed within 72 hours. The following table lists claim errors and fixes, where OWNER_EMAIL is the organization owner’s email address and EMAILED_CODE is the 6-digit verification code:
Coding agent, relay, and MCP connection problems
The following table lists errors when a coding agent, runtype-connect mcp, or runtype-connect relay connects to Runtype. For .runtype/agents.yaml validation errors and relay auto-start failures, see Agent manifest errors.
Trace and run inspection refusals
The following table lists refusals from query_traces, read_trace, get_run_outline, search_run, read_span_payload, and get_span_context. For usage, see Investigate a large run.
Agent map, business context, and pending-action refusals
The following table lists refusals from describe_agents, save_business_context, and resolve_pending_action:
Simulation, signal, and change-brief refusals
Connect tools return structured error codes when prerequisites, spend approvals, estimates, or limits block a request. In these tables, the copy is the simulation copy of your agent that Runtype builds from traces. For an overview of baselines, proposal runs, and reports, see How Runtype works.
Baseline, estimate, and run refusals
The following table lists refusals from start_baseline_simulation, estimate, and run_simulation:
Proposal, test-target, change-brief, and signal refusals
The following table lists refusals when you test proposals, run against a test target, share a report, export a change brief, or save a custom signal:
Next steps
Continue with one of these reference pages or guides:
- Connect a repository: review
initoptions, the no-browser path, and claiming an organization. - Send a first trace: instrument an agent and pass the first-trace check.
- Connect CLI: look up every
runtype-connectcommand, option, and exit code. - Connect MCP tools: check inputs and outputs for every tool on the Runtype Connect MCP server.
- Trace attributes: verify the OpenTelemetry attributes that Runtype reads.