Troubleshooting¶
Common errors and how to fix them.
Exit codes: Configuration and input errors (e.g. trace not found, invalid YAML) produce exit code 2. Infrastructure and judge errors (e.g. API unavailable, rate limit) produce exit code 3. For precise handling, use reason_code in run.json or summary.json; see run reference for the full table and compatibility (v1 vs v2).
Configuration Errors (Exit Code 2)¶
Missing configVersion¶
Fix: Add configVersion: 1 at the top of your config:
YAML Parse Error¶
fatal: ConfigError: failed to parse YAML: did not find expected node content at line 14 column 1, while parsing a flow node
Common causes:
-
Missing colon after key:
-
Incorrect indentation:
-
Unquoted special characters:
Debug tip: Use a YAML validator like yamllint to find syntax errors.
Unknown Policy Type¶
Fix: Use one of the supported policy types:
args_validsequence_validtool_blocklistregex_match
Duplicate Test ID¶
Fix: Ensure all test IDs are unique within the suite.
Test Failures (Exit Code 1)¶
Missing Required Tool¶
What it means: Your config requires notify_slack to be called, but the trace doesn't contain that tool call.
Possible fixes:
- Update the trace: Record a new trace that includes the tool call
- Remove the requirement: If the tool is optional, remove the
requirerule - Check tool name spelling: Ensure the tool name matches exactly
Blocked Tool Called¶
What it means: The agent called a tool that's on your blocklist.
Possible fixes:
- Fix the agent: The agent shouldn't call this tool
- Update blocklist: If the tool is now allowed, remove it from
blocked
Sequence Violation¶
❌ migration_flow failed: sequence_valid (0.0s)
Message: Order violation: run_migration called before create_backup
What it means: Tools were called in the wrong order.
Possible fixes:
- Fix the agent logic: Ensure tools are called in the correct order
- Update the rule: If the order doesn't matter, remove the
beforerule
Schema Validation Failed¶
❌ deploy_test failed: args_valid (0.0s)
Message: Argument validation failed for deploy_service:
- port: expected integer, got string "8080"
What it means: The tool was called with arguments that don't match the schema.
Possible fixes:
- Fix the agent: Ensure arguments have correct types
- Loosen the schema: If string is acceptable, update the schema
Regex Not Matched¶
❌ output_test failed: regex_match (0.0s)
Message: Output did not match pattern: "temperature is \d+ degrees"
What it means: The agent's output doesn't match the expected pattern.
Debug tip: Check the actual output in the trace file to see what was returned.
Trace Issues (Exit Code 2)¶
Trace and input errors use exit code 2 with reason code E_TRACE_NOT_FOUND (or similar) in run.json / summary.json.
Trace File Not Found¶
Exit code: 2. Reason code: E_TRACE_NOT_FOUND (in run.json / summary.json).
Fix: Check the path and ensure the file exists:
Invalid Trace Format¶
Fix: Validate the JSONL file:
Empty Trace¶
Fix: Ensure your recording captured events. Re-record if necessary.
Judge / API Unavailable (Exit Code 3)¶
When the judge service or provider is unreachable or returns an error, Assay exits with exit code 3 and a reason code such as E_JUDGE_UNAVAILABLE, E_RATE_LIMIT, E_PROVIDER_5XX, or E_TIMEOUT in run.json / summary.json.
Typical causes:
- Judge/API endpoint down or returning 5xx
- Rate limit hit (provider or judge)
- Network timeout or connectivity issues
What to do:
- Check the error message and
reason_codeinrun.jsonorsummary.json. - Retry after a short delay (rate limits) or verify the service is up.
- For compatibility and the full reason code list, see run.md — Exit codes and compatibility.
Cache Issues¶
Unexpected Skips¶
Running 5 tests...
⏭️ test_1 skipped (fingerprint match)
⏭️ test_2 skipped (fingerprint match)
⏭️ test_3 skipped (fingerprint match)
What it means: Tests are being skipped because the trace fingerprint matches a previous run.
To force re-run:
# Option 1: Use fresh database
assay run --config eval.yaml --trace-file trace.jsonl --db :memory:
# Option 2: Delete the cache
rm -rf .assay/store.db
Cache Corruption¶
Fix: Delete and rebuild the cache:
Migration Issues¶
External Policy Not Found¶
Fix: Ensure the policy file exists at the referenced path.
Already Migrated¶
What it means: The config is already in v1 format. No action needed.
Python / SDK Issues¶
pip install assay vs assay-it¶
If you ran pip install assay, you installed an unrelated package.
Fix:
Module Not Found¶
Fix: Ensure you have installed the package (it exposes the assay module):
Trace Recording Empty¶
If your trace file is created but has no events:
- Ensure you call
writer.write_trace()or use the context manager. - Check if
record_chat_completions_with_toolsactually ran.
CI/CD Issues¶
Non-Zero Exit in CI¶
Meaning: One or more tests failed. Check the logs for specific failures.
Common CI fixes:
-
Ensure trace files are committed:
-
Use correct paths:
-
Install Assay in CI:
Permission Denied¶
Fix: Ensure the runner has write permissions, or use in-memory mode:
Getting Help¶
If you're stuck:
-
Enable debug logging:
-
Check the GitHub Issues: github.com/Rul1an/assay/issues
-
File a bug report with:
- Assay version (
assay --version) - Full error output
- Minimal config to reproduce