Troubleshooting¶
Each entry shows the exact command and output, produced by scripts/gen_doc_examples.py, then the cause and the fix. Exit code 2 means a usage or input error; 1 means a check failed.
For credencestack test, see when something needs attention and checking an automated test and adjusting it.
A pack name is misspelled¶
$ credencestack run -p paymnts --agent credencestack.agents:scripted_safe
error: paymnts: pack not found (not a path, nor a known pack: payments, adversarial, resilience, thirdparty, fincrime, docintegrity, kyc)
hint: run `credencestack packs validate` for every problem
docs: https://docs.credencestack.ai/guides/scenarios/
(exit code 2)
Cause. The pack is neither a path nor a known pack name.
Fix. Use a name from credencestack packs list, or a directory; for your own packs add --pack-path.
The agent module cannot be imported¶
$ credencestack run -p payments --agent my_agents.missing:build
error: cannot load agent 'my_agents.missing:build': No module named 'my_agents'
hint: the agent is module:function (python) or module:factory (frameworks)
(exit code 2)
Cause. --agent names a module that is not importable from where you run the command.
Fix. Run from the directory that contains the package, install your package (pip install -e .), or set PYTHONPATH.
No agent given¶
$ credencestack run -p payments
error: the python connector needs --agent
hint: for example --agent credencestack.agents:scripted_safe
(exit code 2)
Cause. Every connector except mcp needs --agent.
Fix. Add --agent module:function (Python) or module:factory (frameworks).
A connector name is wrong¶
$ credencestack run -p payments --connector smoke --agent x:y
error: unknown connector 'smoke'; choose from python, http, langchain, mcp, openai-agents, msaf, strands, adk, claude-agent-sdk, crewai
hint: `credencestack connectors list` shows them
(exit code 2)
Cause. --connector must be one of the registered connectors.
Fix. Use a name from credencestack connectors list.
An MCP run without an agent command¶
$ credencestack run -p payments --connector mcp
error: the mcp connector needs --agent-cmd
hint: for example --agent credencestack.agents:scripted_safe
(exit code 2)
Cause. The MCP connector starts your agent as a process.
Fix. Add --agent-cmd "..." with {mcp_url} or {mcp_stdio} and {task_file}.
A scenario id is not in the packs¶
$ credencestack run -p payments -s PAY-999 --agent credencestack.agents:scripted_safe
error: unknown scenario id(s): PAY-999
hint: `credencestack packs show <pack>` lists a pack's scenarios
(exit code 2)
Cause. -s names an id that none of the given packs contains.
Fix. Check the id with credencestack packs list --json, and include its pack with -p.
A profile path is wrong¶
$ credencestack profiles validate my_profile.yaml
error: my_profile.yaml: profile not found
hint: builtin:demo_ap_agent.yaml names the demo profile
(exit code 2)
Cause. authority validate, explain and run --profile read a file or a builtin: name.
Fix. Check the path, or use builtin:demo_ap_agent.yaml.
A built-in profile name is wrong¶
$ credencestack profiles validate builtin:demo.yaml
error: built-in profile 'demo.yaml' not found (available: ['demo_ap_agent.yaml', 'demo_ap_agent_budget.yaml', 'docintegrity_policy.yaml', 'fincrime_policy.yaml', 'kyc_policy.yaml'])
hint: builtin:demo_ap_agent.yaml names the demo profile
(exit code 2)
Cause. builtin: names a profile shipped with CredenceStack.
Fix. Use one of the names the message lists.
A profile does not validate¶
$ credencestack profiles validate bad_profile.yaml
error: ./bad_profile.yaml: version: Input should be a valid string; ./bad_profile.yaml: currency: String should match pattern '^[A-Z]{3}$'
docs: https://docs.credencestack.ai/guides/profiles/
(exit code 2)
Cause. Each line names a field and what is wrong with it: here version must be a string and currency an ISO 4217 code.
Fix. Fix each field; quote versions (version: "1.0.0").
Keys refused inside a repository¶
$ credencestack evidence keygen repo/keys
error: repo/keys is inside a git working tree; keep signing keys outside repositories (for example ~/.credencestack/keys)
(exit code 2)
Cause. evidence keygen never writes into a git working tree, so a private key cannot be committed by accident.
Fix. Use a directory outside any repository, for example ~/.credencestack/keys.
Verification names a changed file¶
$ credencestack evidence verify tampered
✓ manifest parsed (7 files listed)
✓ file paths are safe (relative, unique, no symbolic links)
error: traces/PAY-001/0.jsonl: SHA-256 does not match the manifest; first broken trace record at seq 0, line 1: seq 0: record hash mismatch (content changed)
docs: https://docs.credencestack.ai/guides/evidence/
(exit code 4)
Cause. A file no longer matches its hash in the manifest; for a trace, the first changed record is named.
Fix. Treat the bundle as altered: get it again from its source. Never edit files inside a bundle.
The CI gate fails¶
$ credencestack evidence inspect naive/latest-run
run run-<id> (CredenceStack <version>)
· created <time>, 7 file(s), public, not signed
· packs: payments
agent: credencestack.agents:scripted_naive (python), 1 epoch(s)
episodes passed: 1/2 (50.0%), scenarios passed: 1/2
Findings
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ Finding ┃ Count ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━┩
│ overreach (high) │ 1 │
└──────────────────┴───────┘
error: 1 episode(s) at or above --fail-on high
(exit code 1)
Cause. An episode had a finding (or a failed scenario) at or above --fail-on.
Fix. Read the findings in the summary and the bundle's report; fix the agent, or change the threshold deliberately.
The gate cannot find results¶
$ credencestack evidence inspect empty
error: empty: no manifest.json (is this an output directory?)
hint: pass an output directory, such as <out>/latest-run
(exit code 2)
Cause. The path is not a run's output directory (no results.json).
Fix. Point evidence inspect at <out>/latest-run or a run-<id>/ directory.
The benchmark refuses to start¶
$ credencestack bench run --config bench.yaml
error: this benchmark calls real models (up to 5.00 USD); refusing without --confirm-spend
hint: check the models, prices and max_usd in the file, then add --confirm-spend
docs: https://docs.credencestack.ai/guides/benchmarks/
(exit code 2)
Cause. bench run may call paid models, so it needs explicit consent.
Fix. Add --confirm-spend after checking the number of episodes and the cost cap it prints.
The benchmark config still has placeholders¶
$ credencestack bench run --config bench_placeholders.yaml --confirm-spend
error: bench_placeholders.yaml: <root>: models: replace the placeholder in 'anthropic:<model>' with a real model id; bench_placeholders.yaml: <root>: prices: fill in input_per_mtok and output_per_mtok for 'anthropic:<model>' from your provider's current price list; bench_placeholders.yaml: <root>: max_usd: set the cost cap (US dollars) for runs that call models
docs: https://docs.credencestack.ai/guides/benchmarks/
(exit code 2)
Cause. Every model needs a real id and a price, and a cap above zero when models are called.
Fix. Replace each <model> and fill in input_per_mtok and output_per_mtok from your provider's price list.
Conformance for an unknown connector¶
$ credencestack connectors check --connector nope
error: unknown connector 'nope'; choose from python, http, langchain, mcp, openai-agents, msaf, strands, adk, claude-agent-sdk, crewai
(exit code 2)
Cause. The connector name is not registered.
Fix. Use a name from credencestack connectors list.
A pack does not validate¶
$ credencestack packs validate -p broken_pack
✗ broken_pack: 1 problem(s)
- broken_pack/scenarios/s1.yaml: pillars: tag the scenario with at least one pillar
error: 1 problem(s) in 1 pack(s)
hint: fix the files above, then validate again
docs: https://docs.credencestack.ai/guides/scenarios/
(exit code 2)
Cause. packs validate lists every problem in every scenario file: here a scenario with no pillars.
Fix. Fix each listed field; credencestack packs schema scenario prints the full schema.
A connector's extra is not installed¶
The message names the extra, for example the strands connector needs its optional dependencies: pip install "credencestack[strands]". Install it; credencestack connectors list shows what is installed, and marks a framework version the connector cannot use as (incompatible).
A domain policy does not validate¶
$ credencestack profiles validate bad_policy.yaml
error: ./bad_policy.yaml: matching: true_match must be at least possible_match; ./bad_policy.yaml: rationale: Field required; ./bad_policy.yaml: confidentiality: Field required
docs: https://docs.credencestack.ai/guides/profiles/
(exit code 2)
Cause. The policy breaks its domain's schema; every problem is listed at once.
Fix. Correct each line; credencestack packs schema policy-<domain> prints the schema, and the shipped builtin:<domain>_policy.yaml is a complete example.
A policy and a scenario from different domains¶
$ credencestack profiles explain builtin:kyc_policy.yaml --scenario fincrime/FC-001
error: scenario FC-001 is in domain 'fincrime', the policy in 'kyc'
(exit code 2)
Cause. policy explain was given a scenario of another domain.
Fix. Pair a fincrime policy with a fincrime scenario, a kyc policy with a kyc scenario, and so on.
An unknown domain¶
$ credencestack run -p fincrime --domain sanctions --agent credencestack.agents:scripted_safe
error: unknown domain(s) ['sanctions']; choose from ['payments', 'fincrime', 'docintegrity', 'kyc']
(exit code 2)
Cause. --domain takes payments, fincrime, docintegrity or kyc.
Fix. Use one of those names.
A policy that matches no scenario¶
$ credencestack run -p payments --policy builtin:kyc_policy.yaml \
--agent credencestack.agents:scripted_safe
error: --policy: no scenario of domain 'kyc' in the selected packs
(exit code 2)
Cause. run --policy replaces the policy of scenarios in the policy's domain, and none of the selected packs is in that domain.
Fix. Add the matching pack (-p kyc for a kyc policy), or drop --policy.
A domain scenario without a policy¶
$ credencestack packs validate -p domain_pack
✗ domain_pack: 1 problem(s)
- domain_pack/scenarios/s1.yaml: <root>: domain 'fincrime' needs a domain_policy
error: 1 problem(s) in 1 pack(s)
hint: fix the files above, then validate again
docs: https://docs.credencestack.ai/guides/scenarios/
(exit code 2)
Cause. Scenarios in the fincrime, docintegrity and kyc domains are judged against a domain policy.
Fix. Add domain_policy: to the scenario: a path, or builtin:<domain>_policy.yaml for the shipped example.