-
Notifications
You must be signed in to change notification settings - Fork 2
FAQ
OCC (Claude Chain Orchestrator) is a workflow engine that lets you define multi-step AI agent chains in YAML and execute them with automatic parallel processing, dependency resolution, and real-time streaming.
No. OCC uses the Claude CLI, which handles authentication. You need Claude CLI installed and authenticated (claude auth login).
Any model available through Claude CLI: claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5. Specify per-step with the model field.
Depends on your chain. A typical 6-step chain costs ~0ドル.05-0.15 with Sonnet. See Token Optimization for cost reduction techniques.
Yes. OCC is cross-platform (macOS, Linux, Windows). CI runs on all three.
The Claude CLI is not installed or not in your PATH.
# Install Claude CLI npm install -g @anthropic-ai/claude-code # Verify which claude # macOS/Linux where claude # Windows # Or set path explicitly export CLAUDE_BIN=/path/to/claude
TypeScript is a dev dependency. Use npx:
cd mcp-server npm install npx tsc --noEmit # Type check npm run build # Build
Change the port:
REST_PORT=8080 npm run rest
Your steps have circular depends_on references. Example:
# BAD: A depends on B, B depends on A - id: a depends_on: [b] - id: b depends_on: [a]
Fix: restructure so dependencies form a DAG (directed acyclic graph).
Your chain defines required inputs that weren't provided:
inputs: - name: topic # Required (optional: false is the default) - name: depth optional: true # This one can be omitted
Provide all required inputs when executing:
curl -X POST http://localhost:4242/execute/my-chain \
-d '{"input": {"topic": "AI"}}'Common causes:
-
Timeout — step took too long. Increase
timeout_ms -
Claude error — check the step's
errorfield in the execution result -
Wrong variable — check that
{variable}names matchoutput_varvalues -
Condition false — step was skipped because its
conditionevaluated to false
-
Check execution status:
curl http://localhost:4242/executions/{id} -
Stream real-time logs:
curl -N http://localhost:4242/executions/{id}/stream -
Look at individual step outputs in the execution result — each step has
status,output,error, anddurationMs.
Yes. Add the tools field:
- id: analyze tools: [Read, Write, Bash, Glob, Grep, WebSearch, WebFetch] prompt: "Read and analyze the code at {input.path}" output_var: analysis
Default limit is 5. Wait for running executions to finish, or increase:
MAX_CONCURRENT_EXECUTIONS=10 npm run rest
curl -X DELETE http://localhost:4242/executions/{id}This kills all active processes and marks pending steps as skipped.
curl -X POST http://localhost:4242/executions/{id}/resumeCompleted steps are skipped. Execution resumes from the first non-completed step.
OCC sends heartbeat pings every 30s to prevent this. If you're behind a proxy (Nginx, Cloudflare), configure it to allow long-lived connections:
proxy_read_timeout 3600s; proxy_send_timeout 3600s;
- Check
.mcp.jsonexists in your project root - Verify paths are absolute (not relative)
- Restart Claude Code after editing
.mcp.json - Check that
npm run buildwas run (needsdist/index.js)
The path in .mcp.json → env.CHAINS_DIR doesn't point to a valid directory. Use an absolute path:
"CHAINS_DIR": "/Users/you/projects/OCC/chains"
-
Use parallel steps — remove unnecessary
depends_onso steps run simultaneously -
Use cheaper models —
claude-haiku-4-5for simple classification/extraction - Enable caching — avoid re-running identical prompts
-
Reduce timeout — set
timeout_msper step instead of waiting 30 min default -
Use transforms —
json_extractinstead of asking the LLM to extract
- Reduce
MAX_CONCURRENT_EXECUTIONS - Set
EXECUTION_MAX_AGE_DAYSto a lower value (default: 7) - Large step outputs (>1MB) accumulate in memory — use transforms to reduce size
Use pre_tools to read files and tools: [Write] to create them:
- id: generate tools: [Write] prompt: "Generate code and write to /tmp/output.py" output_var: gen_result - id: review depends_on: [generate] pre_tools: - type: read_file path: "/tmp/output.py" inject_as: code prompt: "Review this code: {code}" output_var: review
pre_tools: - type: env_var var_name: "DATABASE_URL" inject_as: db_url prompt: "Connect to {db_url} and..."
curl -X POST http://localhost:4242/schedules \ -H "Content-Type: application/json" \ -d '{ "label": "Morning briefing", "chainName": "smart-briefing", "input": {"topic": "tech news"}, "cron": "0 8 * * *", "enabled": true }'
- Getting Started — Initial setup
- Chain Format — YAML reference
- Configuration — Environment variables
- Token Optimization — Cost reduction