/** * claude-code spawn adapter: runs one subagent as a headless `claude -p` * subprocess with `--output-format json` and unwraps the result envelope. * * Two hard-won rules from the Phase 1 spike, both load-bearing: * * 1. **Scrub inherited `CLAUDE*` env vars — delete, don't blank.** A workflow * launched from inside a Claude Code session inherits session env that makes * the nested CLI exit 1 with empty output. Setting a var to "" still reads * as set; only deletion works. * 2. **Mark the child as a workflow child instead of disabling hooks.** With * the host repo's hooks active, the coordination Stop hook blocks a headless * child for skipping the end-of-turn ritual (observed: num_turns burned on * re-prompts → error_max_turns). `--settings '{"disableAllHooks":true}'` * fixes that but also kills the coord capture that makes workflow children * visible to peers — the point of running them under harnery. So the child * gets HARNERY_WORKFLOW_CHILD=1 and the stop-hook rule exempts it * (stop-hook.ts), keeping heartbeats + events on. */ import type { AdapterInvocation, AdapterRawResult } from "../adapters/types.js"; import type { Spawner, SpawnRequest, SpawnResult } from "./types.js"; export declare function buildClaudeInvocation(req: SpawnRequest): AdapterInvocation; export declare function normalizeClaudeResult(raw: AdapterRawResult): SpawnResult; export declare const claudeCodeSpawner: Spawner; //# sourceMappingURL=spawn-claude.d.ts.map