/** * Claude Code's Bash tool times a command out after 2 minutes unless the call * passes `timeout`, and caps that at 10 minutes. Org roles doing release work * (installs, full builds, test suites) hit the 2-minute default even when told * to run in the foreground. Claude Code reads both limits from its environment * (BASH_DEFAULT_TIMEOUT_MS / BASH_MAX_TIMEOUT_MS — confirmed in the CLI bundled * with @anthropic-ai/claude-agent-sdk 0.3.226), so a Claude role's session env * sets them. Other runtimes have their own shell tools and ignore these names. */ export declare const DEFAULT_CLAUDE_BASH_TIMEOUT_MS = 600000; /** Upper bound for run_config.bash_timeout_ms. */ export declare const MAX_CLAUDE_BASH_TIMEOUT_MS = 3600000; /** With run_config.deadline_seconds, one Bash call may use at most this share of the time left. */ export declare const BASH_DEADLINE_FRACTION = 0.4; /** ...but never less than this while time is left, so ordinary short commands are not cut. */ export declare const BASH_DEADLINE_MIN_MS = 30000; /** * The timeout of a Bash call in a run with a deadline: the role's usual ceiling (`maxMs`) or its own * request, whichever is smaller, limited to a fraction of the time left (at least BASH_DEADLINE_MIN_MS * or what is left, and 5 s once the deadline has passed). A hung command then costs a fraction of the * remaining time instead of all of it (the parallel-sweep-3 trial of 2026-10-05 lost a 10-minute * Bash timeout out of a 720 s run). */ export declare function capBashTimeoutMs(args: { remainingMs: number; requestedMs?: number; maxMs: number; }): number; export declare function claudeBashTimeoutEnv(timeoutMs?: number): Record; /** * #339: Claude Code's sandbox makes an existing `hooks` or `config` entry * read-only in every directory from the session's cwd down to the Bash * shell's current directory (its guard against a planted bare git repo; same * CLI). The shell's directory persists between Bash calls, so after * `cd /packages/@monomind/memory` the sibling package * `packages/@monomind/hooks` became read-only for the following commands, and * which directory got hit depended on where earlier commands had left the * shell. With CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR the shell returns to * the session's cwd after every command, so only the cwd itself is ever * walked. The role prompt says so, since the Bash tool's own description still * claims the directory persists. */ export declare const CLAUDE_SANDBOX_CWD_ENV: { CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR: string; }; export declare const claudeSandboxCwdNote: (cwd: string) => string; //# sourceMappingURL=bash-timeout.d.ts.map