Repository navigation
feat: Claude Code runner, Windows fixes, and workflow examples - #25
Conversation
Always request --output-format json so the response shape is known, and
only unwrap stdout when it is an envelope (type: "result"). Plain model
replies that happen to look like JSON, such as {"result": "hola"}, are
returned unchanged instead of being rewritten or treated as errors.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
temperature, max_tokens and retries only take effect for HTTP providers. Process runners ignore them silently, so the parser now rejects them when runner is claude. timeout is kept: the process executor enforces it for every runner. Field docs in LocalAgentConfig describe where each applies. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The npm install puts claude.cmd first on PATH. Bun refuses to pass arguments with cmd special characters to .cmd files, and every structured call carries a JSON schema with those characters, so the run failed before Claude Code started. Resolve the claude.exe that the shim wraps when the PATH entry is a .cmd or .bat file. Other platforms and installs are unchanged. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Link the RunnerPool, DSL timeout unit, and permissions issues, and record the measured per-call overhead of the claude runner. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Project skill that teaches Claude to write, compile, dry-run and cost small Sam automations. Covers the verified syntax, timeout units, claude runner rules, measured per-call cost, parallelism via separate sam run processes, and known pitfalls. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Three single-purpose flows: ticket readiness check, PR review gate, and iteration digest (use unsafe). Adds a parallel fan-out script that runs one flow over a folder of inputs as separate sam run processes. Inputs are synthetic or come from this public repository. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Sam PR ReviewVerdict: The PR introduces new variables in generateAgent that are never used, which will trigger linting failures and may indicate incomplete implementation of the new Claude runner options. Additionally, the claudeStrategy does not handle the Findings
Suggested tests
Advisory review generated by Sam with Groq. It does not approve or block the pull request; |
Sam Edition GuardRisk: The update adds optional properties and validation for Claude Code runner agents but does not alter existing 2026 syntax or defaults. Recommendation: No action required for 2026 programs; new properties are optional and backward compatible. Generated by Sam with Groq from the compiler diff. Deterministic fixture compilation always runs; this audit is advisory unless it reports an edition 2026 impact. |
Summary
Adds a
clauderunner so Sam agents can run through the Claude Code CLI (claude -p), with structured output from a JSON schema or raw text throughuse unsafe.What changed
ClaudeStrategybuildsclaude -pcommands with model, system prompt, effort, permission mode, turn and budget limits, tool allow and deny lists, and--bare. It always requests the JSON envelope and only unwraps real envelopes (type: "result").clauderesolves to an npm.cmdshim, the nativeclaude.exebehind it is used. Bun refuses to pass JSON schema arguments to.cmdfiles.temperature,max_tokensandretriesare rejected forrunner: claude, because the process executor ignores them.timeoutstill applies to every runner.examples/workflows/has three single-purpose flows (ticket readiness, PR review gate, iteration digest) andrun_parallel.shfor fan-out over many inputs. Inputs are synthetic or come from this repository..claude/skills/sam-automation/SKILL.mdteaches Claude to write, compile, dry-run and cost small.sbautomations.Verification
bun test: 156 pass, 1 skip (platform-specific), 0 fail. Typecheck and the coverage gate pass on Windows. The same tests and typecheck pass in a Linux container.sam run, a schema-lessuse unsafecall, two concurrent flows with different models, sonnet-to-haiku delegation, a timeout (TIMEOUT_ERRORat 2 s, no leftover processes), and an unknown model (EXECUTION_ERROR).mockdry run, and runs for real on synthetic input.Measured
Small benchmark on six code reviews, not a general claim:
claude -pcall carries about $0.08 of fixed overhead.Known limits
parallel(...)in the DSL; fan-out is done with separatesam runprocesses.arrayis untyped), so batched results cannot be validated per item..sbhas no comment syntax..sbare in seconds, while the runtime uses milliseconds.Follow-up issues
#18 RunnerPool · #19 timeout units · #20 claude permissions · #21 typed lists · #22
paralleltoken · #23 missing workspace error · #24 comment syntax🤖 Generated with Claude Code