@langwatch/scenario
    Preparing search index...

    Interface ClaudeCodeAgentAdapterConfig

    Configuration for ClaudeCodeAgentAdapter.

    interface ClaudeCodeAgentAdapterConfig {
        claudeBin?: string;
        env?: Record<string, string | undefined>;
        extraArgs?: string[];
        logger?: Logger;
        maxToolInputChars?: number;
        maxToolResultChars?: number;
        model?: string;
        output?: "text" | "messages";
        replayOnLostSession?: boolean;
        skillPath?: string;
        skipPermissions?: boolean;
        timeout?: number;
        workingDirectory: string;
    }
    Index
    claudeBin?: string

    Path or name of the Claude Code binary. Resolution order: claudeBin → process.env.CLAUDE_BIN → "claude".

    env?: Record<string, string | undefined>

    Environment of the CLI process, applied over this process's environment. A key set to undefined is removed, which is how a test keeps a provider key for its judge while hiding it from the agent, or keeps the batch id of the harness out of the scenario runs the agent writes itself. PATH set here replaces the inherited one, so prefix it to put a local binary in front. FORCE_COLOR=0 is always set last.

    extraArgs?: string[]

    Extra CLI args inserted before the prompt argument. Use for flags this config does not model directly.

    logger?: Logger

    Optional logger for all diagnostics. Defaults to a no-op logger (silent).

    maxToolInputChars?: number

    How many characters of one string inside a tool call input reach the conversation. A call carries what the agent wrote, which is the work under judgement, so it keeps more room than a result.

    30000
    
    maxToolResultChars?: number

    How many characters of one tool result reach the conversation. The judge reads the whole conversation on every step, and one exported trace can hold hundreds of kilobytes.

    8000
    
    model?: string

    Optional model identifier passed through as --model <model>.

    output?: "text" | "messages"

    What call returns for a turn.

    • "text" (default): the assistant-visible text, with tool calls and results rendered inline as readable lines.
    • "messages": AI SDK messages, one text part plus a tool-call part per tool the agent called, and a tool message with a tool-result part per result. The judge and the user simulator then read the calls structurally, and the LangWatch run view renders them as tool calls.
    "text"
    
    replayOnLostSession?: boolean

    What to do when a --resumed session has vanished server-side.

    • false (default): reject the turn with an actionable error naming this flag. Fail-loudly is the default because the alternative is a silent modality change (see below) under an eval harness.
    • true: recover in place — evict the dead id and re-run the SAME turn from the full transcript against a fresh session.

    The recovery re-flattens the whole conversation into a role: content prompt for a NEW session, so it loses server-side session state (context cache, tool state): the turn is no longer a true --resume continuation. Enable it only when surviving a lost session matters more than that fidelity.

    false
    
    skillPath?: string

    Optional absolute path to a SKILL.md to inject into the working directory before the CLI runs (see injectSkill). When omitted, no skill injection occurs.

    skipPermissions?: boolean

    When true, passes --dangerously-skip-permissions. Never passed otherwise. Off by default.

    timeout?: number

    Per-call timeout in milliseconds. On exceed, the child is killed and call rejects with a timeout error.

    120000
    
    workingDirectory: string

    Directory the Claude Code CLI is spawned in (its cwd). Files Claude reads or writes are resolved relative to this.