CLI Prompt Management Tool - Guides and Documentation
| English | 日本語 |
A consolidated reference for diagnosing and resolving errors across Climpt and Iterate Agent.
| Error Message / Keyword | Section |
|---|---|
gh: command not found |
1.2 gh CLI not found |
deno: command not found |
1.1 Deno not found |
Permission denied / EACCES / EPERM |
1.3 Permission denied |
Configuration load failed at |
2.1 Configuration file not found |
Unknown key: runner.completion |
2.2 Unknown key warnings |
Prompt not found: |
2.3 Validation failure |
rate limit / 429 / Too many requests |
3.1 Rate limit / API errors |
Cannot execute SDK query() in double sandbox |
3.2 Sandbox restrictions |
Claude Code process exited with code 1 |
3.2 Sandbox restrictions / 3.4 permissionMode mismatch |
Empty output from breakdown CLI |
4.1 Empty output |
FAILED_STEP_ROUTING |
4.2 Step routing errors |
GATE_INTERPRETATION_ERROR |
4.2 Step routing errors |
Maximum iterations (N) reached |
4.3 Verdict / completion failures |
No fallback prompt found |
4.4 No fallback prompt found |
AGENT_NOT_INITIALIZED |
4.5 Initialization errors |
Symptom: deno: command not found or unexpected API errors after running
commands.
Cause: Deno is not installed, or the installed version is below 2.5.
Resolution:
# Install Deno
curl -fsSL https://deno.land/install.sh | sh
# Verify version (requires 2.5+)
deno --version
Prevention: Pin the Deno version in your CI configuration and document it in the project README.
Symptom: gh: command not found, or gh auth status reports “not logged
in”.
Cause: GitHub CLI is not installed or not authenticated.
Resolution:
# Install (macOS)
brew install gh
# Authenticate interactively
gh auth login
# Verify
gh auth status
Prevention: Run gh auth status as part of your project setup checklist.
See 01-prerequisites.md.
Symptom: Permission denied, EACCES, or operation not permitted during
file operations or command execution.
Cause: File-system permissions are insufficient, or sandbox restrictions block access.
Resolution:
ls -la .agent/
dangerouslyDisableSandbox: true in the Bash tool call or run from an
external terminal.Prevention: Run agent commands from a terminal where the current user owns the project directory.
Symptom: ECONNREFUSED, ETIMEDOUT, ENOTFOUND, or socket hang up.
Cause: Network connectivity problems, VPN/proxy configuration, or DNS resolution failure.
Resolution:
curl -s https://api.anthropic.com/health
HTTPS_PROXY:
export HTTPS_PROXY=http://proxy.example.com:8080
Prevention: Ensure stable connectivity before starting long-running agent sessions.
Symptom: ConfigError (code: AC-LOAD-001 to AC-LOAD-003) with message
Configuration load failed at <path>.
Cause: The agent.json, config.json, or prompt templates are missing.
Initialization was skipped or ran in the wrong directory.
Resolution:
cd your-project
deno run -A jsr:@aidevtool/climpt/agents/iterator --init
Prevention: Always run --init from the project root before first
execution.
Symptom: Warnings such as Unknown key: runner.completion or
Unknown key: completionConditions.
Cause: The configuration uses v1.12.0 key names that were renamed in v1.13.0.
Resolution: Rename keys per the migration mapping:
| Old Key | New Key |
|---|---|
runner.completion |
runner.verdict |
completionKeyword |
verdictKeyword |
completionConditions |
validationConditions |
completionSteps |
validationSteps |
completionPatterns |
failurePatterns |
See 09-migration-guide.md for the full mapping.
Prevention: Run --validate after editing configuration files.
Symptom: ConfigError (code: PR-FILE-001) (Prompt not found: <path>),
missing required fields, or invalid enum values for permissionMode or
runner.verdict.type.
Cause: Configuration contains typos, missing required fields, or values outside the allowed set.
Resolution:
deno task agent --agent <name> --validate
permissionMode: default, plan, acceptEdits, bypassPermissionsrunner.verdict.type: detect:keyword, count:iteration, poll:state,
detect:graph, meta:customPrevention: Always validate before running:
deno task agent --agent <name> --validate.
Symptom: SchemaPointerError or MalformedSchemaIdentifierError in logs.
Cause: outputSchemaRef in steps_registry.json references a non-existent
pointer or uses malformed JSON Pointer syntax.
Resolution:
schemasBase directory.outputSchemaRef uses the object format:
{
"outputSchemaRef": {
"file": "step-output.schema.json",
"schema": "initial.assess"
}
}
schema key exists in the definitions section of the schema
file.Prevention: Use standard JSON Pointer format ("#/definitions/stepId") and
validate schema files are valid JSON.
Symptom: Messages containing rate limit, 429, Too many requests, or
You've hit your limit.
Cause: The Anthropic API rate limit has been reached.
Resolution:
The runner detects rate-limit errors (category: API, code: AGENT_RATE_LIMIT)
and retries automatically with exponential backoff:
min(5000 * 2^attempt, 60000)If retries are exhausted, wait a few minutes and re-run.
Prevention: Use --iterate-max to limit total iterations and avoid
excessive API usage.
Symptom: Cannot execute SDK query() in double sandbox environment or
Claude Code process exited with code 1.
Cause: Running the agent inside Claude Code’s Bash tool creates a double-sandbox situation. The outer sandbox blocks network access before the inner SDK sandbox can reach the API.
Resolution:
deno task agent --agent iterator --issue 123
Bash({
command: "deno task agent --agent iterator --issue 123",
dangerouslyDisableSandbox: true,
});
The environment checker (environment-checker.ts) detects this situation and
reports:
insideClaudeCode: whether CLAUDE_CODE=1 or CLAUDE_SESSION_ID is setsandboxed: whether SANDBOX_ENABLED=true or SANDBOX_ID is setnestLevel: parsed from CLAUDE_NEST_LEVEL (warning at level > 1)Prevention: Prefer terminal execution for agent runs.
Differential diagnosis: If other agents succeed in the same environment, the cause is not sandbox restrictions. Check 3.4 permissionMode mismatch instead.
Symptom: The agent attempts to use a tool but receives a permission denial, or silently skips expected actions.
Cause: allowedTools in config.json or steps_registry.json does not
include the required tool, or permissionMode is too restrictive.
Resolution:
allowedTools in your configuration:
{
"agents": {
"climpt": {
"allowedTools": [
"Skill",
"Read",
"Write",
"Edit",
"Bash",
"Glob",
"Grep"
],
"permissionMode": "acceptEdits"
}
}
}
filterAllowedTools() automatically removes boundary tools (e.g.,
githubIssueClose) during work/verification steps. This is intentional.Prevention: Declare all needed tools explicitly in allowedTools and use
acceptEdits for normal operation.
Symptom: Claude Code process exited with code 1, but other agents run
successfully in the same environment.
Cause: The agent’s permissionMode is set to bypassPermissions, which
requires the --dangerously-skip-permissions CLI flag when launching Claude
Code. Without this flag, Claude Code exits immediately with code 1.
This error is often misdiagnosed as a sandbox issue because the error message is identical. The key differentiator is whether other agents succeed — if they do, the environment is fine and the problem is agent-specific configuration.
Resolution:
permissionMode setting:
cat .agent/<name>/agent.json | jq '.runner.boundaries.permissionMode'
"bypassPermissions", either:
"acceptEdits" (recommended for interactive use):
{
"runner": {
"boundaries": {
"permissionMode": "acceptEdits"
}
}
}
Comparison:
| Agent A (works) | Agent B (fails) | Diagnosis |
|---|---|---|
acceptEdits |
bypassPermissions |
permissionMode issue |
acceptEdits |
acceptEdits |
Not this issue |
Error chain: When this occurs, the runner may also report
[StepFlow] No intent produced — this is a secondary error caused by the
process crash, not a schema configuration problem.
Prevention: Use bypassPermissions only in CI/unattended environments where
the required CLI flags are guaranteed. Use acceptEdits for interactive
development.
Symptom: Agent log shows Empty output from breakdown CLI or the prompt
loader returns no content.
Cause: The C3L prompt file does not exist at the expected path, or the
@tettuan/breakdown CLI returned an empty result.
Resolution:
deno run -A jsr:@aidevtool/climpt/agents/iterator --init
ls .agent/iterator/prompts/dev/
runner.flow.prompts.fallbackDir points to a valid directory.Prevention: Run --init whenever you change agent definitions or update
Climpt versions.
Symptom: AgentStepRoutingError (code: FAILED_STEP_ROUTING) or
GateInterpretationError (code: GATE_INTERPRETATION_ERROR).
Cause: StepGateInterpreter could not determine an intent from the
structured output. This usually means the LLM response did not match any defined
transition.
Resolution:
transitions in steps_registry.json cover all possible intents:
cat .agent/<name>/steps_registry.json | jq '.steps[].transitions'
outputSchemaRef is correctly configured (structured output is
required for intent routing).AgentStepIdMismatchError (code: AGENT_STEP_ID_MISMATCH) – the
schema may be missing a "const" constraint on the stepId field.Prevention: Always define outputSchemaRef with a const constraint for
stepId, and cover all expected intents in transitions.
Symptom: AgentMaxIterationsError with message
Maximum iterations (N) reached without finishing, or the agent runs
indefinitely.
Cause: The verdict condition is never satisfied.
Resolution by verdict type:
| Verdict Type | Common Cause | Fix |
|---|---|---|
detect:keyword |
Keyword not present in agent output | Verify verdictKeyword in runner.verdict.config |
count:iteration |
maxIterations too low |
Increase maxIterations |
poll:state |
Issue state unchanged | Check gh issue view <num> --json state |
detect:graph |
Step never reaches terminal state | Review transitions in steps_registry.json |
Prevention: Always set --iterate-max as a safety cap, even when using
other verdict types.
Error:
No fallback prompt found for key: "initial.issue" (step: initial.issue)
Cause: The fallbackKey in steps_registry.json does not match any default
template key. Most commonly, dot-separated format is used instead of
underscore-separated format.
Fix:
steps_registry.json for the failing agentfallbackKey to underscore-separated format:| Incorrect (dot) | Correct (underscore) |
|---|---|
initial.issue |
initial_issue |
continuation.issue |
continuation_issue |
initial.default |
initial_iterate |
closure.issue |
issue_closure_default |
Verification:
deno task climpt --agent <name> --dry-run --issue 1
Tip: Compare with a generated scaffold:
deno task climpt --init --agent test-compare
# Compare generated steps_registry.json fallbackKey values with yours
Symptom: AgentNotInitializedError (code: AGENT_NOT_INITIALIZED) or
worktree setup failures.
Cause: AgentRunner was used before calling initialization, or
setupWorktree failed due to branch-name collisions or directory conflicts.
Resolution:
--init has been run:
deno run -A jsr:@aidevtool/climpt/agents/iterator --init
git branch -a | grep <worktree-branch-name>
git worktree list
git worktree remove <path>
Prevention: Use unique branch names for each agent session and clean up stale worktrees regularly.
Enable verbose output to see detailed execution information:
deno task agent --agent iterator --issue 123 --verbose
Verbose output includes:
Check configuration for structural errors without running the agent:
deno task agent --agent my-agent --validate
Example output for a valid configuration:
agent.json: OK
steps_registry.json: OK
Prompt files: 4/4 found
Schema files: 2/2 valid
Example output with errors:
agent.json: ERROR - Unknown key "runner.completion" (did you mean "runner.verdict"?)
steps_registry.json: WARNING - Step "plan" missing "stepKind" field
Logs are saved in JSONL format under the logging directory:
tmp/logs/agents/<agent-name>/session-<timestamp>.jsonl
Useful jq queries:
# Show all log levels and messages
cat tmp/logs/agents/iterator/*.jsonl | jq '{level: .level, message: .message}'
# Extract errors only
cat tmp/logs/agents/iterator/*.jsonl | jq 'select(.level == "error")'
# Show error codes and guidance
cat tmp/logs/agents/iterator/*.jsonl | jq 'select(.level == "error") | {code: .data.code, message: .data.message, guidance: .data.guidance}'
# Track step transitions
cat tmp/logs/agents/iterator/*.jsonl | jq 'select(.message | test("step|transition"; "i"))'
# Check schema resolution status
cat tmp/logs/agents/iterator/*.jsonl | jq 'select(.message | test("schema|outputSchemaRef"; "i"))'
Run these commands to gather environment information for troubleshooting:
# Deno version and cache info
deno --version
deno info
# GitHub CLI status
gh auth status
gh api /user --jq '.login'
# Git repository status
git status
git remote -v
# Verify agent configuration files
ls -la .agent/*/agent.json
ls -la .agent/*/steps_registry.json
# Check for double sandbox indicators
echo "CLAUDE_CODE=$CLAUDE_CODE"
echo "SANDBOX_ENABLED=$SANDBOX_ENABLED"
echo "CLAUDE_NEST_LEVEL=$CLAUDE_NEST_LEVEL"
All errors extend ClimptError (alias: AgentError). Each error provides
code, recoverable, and toJSON() for structured logging.
| Error Class | Code | Recoverable | Category |
|---|---|---|---|
AgentNotInitializedError |
AGENT_NOT_INITIALIZED |
No | Runner |
AgentQueryError |
AGENT_QUERY_ERROR |
Yes | Runner |
AgentVerdictError |
AGENT_VERDICT_ERROR |
Yes | Runner |
AgentTimeoutError |
AGENT_TIMEOUT |
Yes | Runner |
AgentMaxIterationsError |
AGENT_MAX_ITERATIONS |
No | Runner |
AgentRetryableQueryError |
AGENT_RETRYABLE_QUERY_ERROR |
Yes | Runner |
AgentSchemaResolutionError |
FAILED_SCHEMA_RESOLUTION |
No | Flow |
AgentStepIdMismatchError |
AGENT_STEP_ID_MISMATCH |
No | Flow |
AgentStepRoutingError |
FAILED_STEP_ROUTING |
No | Flow |
GateInterpretationError |
GATE_INTERPRETATION_ERROR |
No | Flow |
RoutingError |
ROUTING_ERROR |
No | Flow |
SchemaPointerError |
SCHEMA_POINTER_ERROR |
No | Flow |
MalformedSchemaIdentifierError |
MALFORMED_SCHEMA_IDENTIFIER |
No | Flow |
AgentEnvironmentError |
AGENT_ENVIRONMENT_ERROR |
No | Environment |
AgentRateLimitError |
AGENT_RATE_LIMIT |
Yes | Environment |
ConfigError (AC-LOAD-*) |
AC-LOAD-001..003 |
No | Environment |
ConfigError (PR-FILE-001) |
PR-FILE-001 |
No | Environment |
If you encounter an issue not covered here, please create an Issue: https://github.com/tettuan/climpt/issues