Claude Code
Claude Code (claude-code) is Anthropic’s agentic coding CLI and the default harness in the built-in Feature, Bug fix and Blank pipeline templates. It streams structured JSON, so Jimothy shows every tool call, thinking block and result live, and records cost and tokens per step.
Install and sign in
Section titled “Install and sign in”npm i -g @anthropic-ai/claude-codeclaude # run once interactively to sign in, then exitclaude --versionThen open Harnesses and click Re-detect. The card turns green and shows the version. If it says "claude" not found on PATH, see Auto-detection. Claude Code’s own installer puts the binary in ~/.claude/local or ~/.local/bin, both of which Jimothy searches automatically.
Claude Code uses whatever authentication you set up for it (a Claude subscription login or ANTHROPIC_API_KEY). Jimothy doesn’t manage that login.
Default configuration
Section titled “Default configuration”| Field | Default |
|---|---|
| Command | claude |
| Arguments | -p --output-format stream-json --verbose --dangerously-skip-permissions |
| Model arguments | --model {{model}} |
| System prompt arguments | --append-system-prompt {{systemPrompt}} |
| Subagent arguments | --agents {{subagents}} |
| Prompt delivery | stdin |
| Output format | Claude Code stream-json (claude-stream-json) |
| Version check args | --version |
| Model list source | Anthropic API |
| Models | opus, sonnet, haiku, claude-opus-5-5, claude-fable-5-1, claude-opus-5, claude-sonnet-5, claude-haiku-4-5 |
| Default model | sonnet |
With a model and system prompt selected, a step runs roughly:
claude -p --output-format stream-json --verbose --dangerously-skip-permissions \ --model opus --append-system-prompt "<system prompt>" < promptBecause this harness has no {{options}} marker, the model, system-prompt and subagent arguments are appended at the end.
What you see in the logs
Section titled “What you see in the logs”The claude-stream-json parser turns each event into a log line:
systeminit →session <id> · model <model> · cwd <dir>(the session id is stored on the step and shown under Details → Session id).- Assistant text → assistant lines; thinking blocks → thinking lines (hide them with the Thinking checkbox in the log viewer).
- Tool calls →
Tool: <primary argument>, e.g.Bash: npm test,Edit: src/api.ts,Grep: TODO. - Tool results → result lines (clipped at 1,500 characters); tool errors show as errors.
- Final
resultevent →success · 12 turns · $0.4213 · 81234 in / 2210 out tokens.
The step’s Output is the final result text, or the last assistant message if there is none. The step fails if Claude Code exits non-zero or the result event has is_error set or an error… subtype.
Models
Section titled “Models”Pick a model per step in the step editor. The aliases opus, sonnet and haiku are resolved by Claude Code itself. Full ids like claude-opus-5 also work.
The Models button (or Fetch latest in the editor) queries the Anthropic Models API, so it needs ANTHROPIC_API_KEY in Jimothy’s environment. Aliases without digits (opus, sonnet, haiku) are kept in the list because the API doesn’t return them. Without a key you get:
Set ANTHROPIC_API_KEY (or add it to the harness env) to fetch models from the Anthropic APIYou don’t need the list to be fetched to use a model; you can always type an id. See Models.
Subagents
Section titled “Subagents”Subagents defined in Pipeline settings → Subagents and attached to an agent step are passed to Claude Code as --agents '<json>'. {{subagents}} renders to a JSON object keyed by subagent name:
{ "security-reviewer": { "description": "Use for any change touching auth or input parsing", "prompt": "You are a security reviewer…", "tools": ["Read", "Grep", "Glob"], "model": "opus" }}tools and model are included only when set. The step log records Subagents: security-reviewer, ….
Cost and tokens
Section titled “Cost and tokens”Claude Code reports total_cost_usd and token usage in its result event, so each step shows cost, and the run header, Dashboard Agent spend · 7d and notifications add them up. Input tokens shown in the UI include cache reads.
Running as root
Section titled “Running as root”Fix it by editing the harness:
- Open Harnesses, click the pencil on Claude Code.
- In Arguments, replace the line
--dangerously-skip-permissionswith two lines:--permission-modeandacceptEdits. - Click Save.
With acceptEdits, Claude Code can edit files without asking, but tools that need other permissions are not auto-approved. Better still, run Jimothy as a normal user.
- Plan with Opus, build with Sonnet. The Feature: Plan → Build → Review → PR template uses
opusfor the plan step andsonnetfor implementation. - Give the agent a commit instruction. The built-in implement prompt ends with Commit your work with a descriptive message referencing
{{issue.key}}, so the PR step has something to push. - Timeouts. Set Flow → Timeout (minutes) on long steps (the Feature template uses 20 minutes for plan and review and 60 for implement). A timeout kills Claude Code and every process it started.
- Root cause of
exited with code 1. Open the step’s Logs tab; stderr lines are prefixed with!, and the last five also appear in the step error.