v1.3.11

config.json Limits

Last updated


The runtime limits config.json can raise, and the package defaults it cannot change.
Missing reply_lang, output_dir, and model_tag are filled with defaults and written back on startup. Since v1.1.2 missing limit fields are no longer filled in, and a limit can only raise its default: the effective value is max(config value, default), so a smaller value is ignored.
KeyDefaultDescription
limits.max_tool_iterations256Maximum tool iterations per run (128 before v1.1.2)
limits.agent_send_timeout_seconds600Model-request timeout
limits.max_history_messages16Recent history messages retained (24 before v1.1.2)
limits.max_history_bytes4194304History-size ceiling. Changed from 5242880 in v1.0.12, where it became MAX_DOCUMENT_BYTES * 4 — four times the 1 MiB single-document ceiling

Package defaults that are not read from config.json (since v1.1.2 all of them live in configs/configs.go):
ConstantDefaultDescription
MAX_SESSION_TASKSmax(NumCPU / 2, 3)Concurrent tasks per session; further tasks queue rather than fail (3 from v1.1.2 to v1.2.3, NumCPU × 4 before v1.1.2)
MAX_CONCURRENT_SUBAGENTSmax(NumCPU / 2, 3)Subagent legs running at once; the rest queue (3 before v1.3.0)
MAX_SUBAGENT_TIMEOUT_MIN30Subagent timeout in minutes
MAX_RESUME_WAIT_MIN60How long a pending resume waits for answers
MAX_CONCURRENT_TOOLSmax(NumCPU / 2, 3)Concurrent tool calls within one model turn; the rest queue (v1.0.20; 5 before v1.3.0)
MAX_BACKGROUND_TASKSmax(NumCPU / 2, 3)Added in v1.3.0. Background commands and background subagent legs running at once in one session; one more is refused (run_websocket streams: Removed in v1.3.2)
MAX_BACKGROUND_TIMEOUT_MIN60Added in v1.3.0. Upper bound and default of background_command's timeout_min (run_command_background and run_websocket: Removed in v1.3.2)
BACKGROUND_THRESHOLD_MIN5Expected run time in minutes above which a job whose output does not decide the next step goes to background_command instead of run_command
WATCH_SETTLE_SEC / WATCH_SETTLE_MAX_SEC2 / 10After an error-keyword hit in background_command output, the watcher waits for 2 s of quiet, at most 10 s, before reporting
WATCH_REPORT_COOLDOWN_SEC30At most one watch report per 30 s per command
WATCH_BUFFER_MAX_BYTES / WATCH_LINE_MAX_BYTES / WATCH_REPORT_MAX_BYTES32 KiB / 8 KiB / 8 KiBWatch buffer, per-line cap, and the latest output sent with one report

The daemon port is not configurable: 17989 is a package constant, and a limits.port entry is ignored.
There are no environment variables for runtime limits — env-based overrides were removed; config.json is the only knob.
中文