GthConfig
Defined in: core/dist/config/types.d.ts:99
This is a processed Gaunt Sloth config ready to be passed down into components.
Default values can be found in DEFAULT_CONFIG
Properties
Section titled “Properties”a2aAgents?
Section titled “a2aAgents?”
optionala2aAgents?:Record<string,unknown>
Defined in: core/dist/config/types.d.ts:355
A2A (Agent-to-Agent) protocol agents configuration.
Enables delegation of tasks to external AI agents.
Each agent becomes available as a tool named a2a_agent_<agentId>.
This feature is experimental and may change.
agent?
Section titled “agent?”
optionalagent?:object
Defined in: core/dist/config/types.d.ts:114
Selects the agent backend.
lean(default when omitted): the plain LangChain agent (GthLangChainAgent). It is given gsloth’s full toolset (filesystem + hardened dev/shell + thegth_checklistplanning tool), with no deepagents machinery (no/large_tool_resultsoffload). This is the recommended backend and the default for the CLI (code/chat), single-shot (ask/exec), and the AG-UI/api server.deep(experimental, opt-in): the deepagents runtime (subagents,write_todos, summarization, tool-result offload). Selecting it emits a warning. It can exhibit path-divergence and sporadic failures and carries extra internal workarounds; preferlean.
Honored everywhere; the ACP server is still structurally deep-only and always runs deep.
backend?
Section titled “backend?”
optionalbackend?:"deep"|"lean"
aiignore?
Section titled “aiignore?”
optionalaiignore?:object
Defined in: core/dist/config/types.d.ts:357
enabled?
Section titled “enabled?”
optionalenabled?:boolean
patterns?
Section titled “patterns?”
optionalpatterns?:string[]
allowDirs?
Section titled “allowDirs?”
optionalallowDirs?:string[]
Defined in: core/dist/config/types.d.ts:451
Transient (runtime-only) extra filesystem roots the agent is allowed to read/write for
THIS run, in addition to the cwd sandbox. Populated by gth exec --allow-dir <path>
(repeatable); never persisted to a config file. When set, the deep agent’s
FilesystemBackend drops virtualMode (so absolute paths and .. resolve on the
real filesystem) and access is constrained to cwd + these dirs via permission allow-rules.
Removing the cwd-only sandbox is a guardrail removal, so callers announce it loudly.
allowedTools?
Section titled “allowedTools?”
optionalallowedTools?:string[]
Defined in: core/dist/config/types.d.ts:226
Restrict the agent to this allow-list of tool names, applied after every tool source
(filesystem, built-in, custom, MCP, A2A, and tools) is resolved. This is the only knob
that can gate MCP and A2A tools, which have no per-source override of their own.
- omitted/undefined: no filtering, all resolved tools remain available.
- non-empty array: keep only tools whose name is in the list.
- empty array
[]: disable every tool. MCP servers are not even contacted (no OAuth), which is useful for agents that only need to reason over the prompt (e.g. the review agent).
Can be overridden per command via commands.<command>.allowedTools.
approvals?
Section titled “approvals?”
optionalapprovals?:ApprovalsConfig
Defined in: core/dist/config/types.d.ts:211
CFG-27 — the tool-approval ladder: one of the five rungs (read-only · write ·
auto-safe · full-auto · bypass), written either as the bare rung name or as an object
carrying the rater’s identity profile and the declared allow/deny lists. Each rung fully
determines behaviour — there are no severity thresholds, no strictness levels and no
independent rater switch.
Settable at the root or per command (commands.<command>.approvals). §9.1 — a per-command
value overrides only the fields it NAMES. mode, rater and raterTimeoutMs replace the
root’s; deny and escalate CONCATENATE across every scope, so a per-command rung can never
discard the root’s prohibitions; allow is REPLACED when the command states its own and
inherited when it does not, so a scope may narrow what runs unprompted and may never widen
what is prohibited (§3.1: a too-broad allow entry runs unrated, a missed deny entry does not).
Absent = auto-safe, resolved by resolveApprovals.
askWriteMode?
Section titled “askWriteMode?”
optionalaskWriteMode?:boolean
Defined in: core/dist/config/types.d.ts:457
Transient (runtime-only) flag set by gth ask --write: opt ask into the same
“do-the-job” filesystem + dev tools that exec/code get, so a question can act
(read/write files, run commands) rather than only chat. Never persisted to a config file.
binaryFormats?
Section titled “binaryFormats?”
optionalbinaryFormats?:false|BinaryFormatConfig[]
Defined in: core/dist/config/types.d.ts:138
Binary format support configuration. Disabled by default unless explicitly configured.
builtInTools?
Section titled “builtInTools?”
optionalbuiltInTools?:BuiltInToolsSetting
Defined in: core/dist/config/types.d.ts:195
Selects and configures the built-in tools the agent loads. Either a string[] of tool names
(each enabled) or a registry keyed by tool name whose values enable (true), force-disable
(false), or configure (BuiltInToolConfig) each tool. CFG-18 folded the former
per-command devTools (the run_* commands + run_shell_command’s EXT-9/10/12 config) into
this single registry: e.g. { "run_tests": { "command": "npm test" }, "run_shell_command": { "timeout": 300000 } }. Settable at the root or per command (commands.<command>.builtInTools);
a per-command value replaces the top-level one.
builtInToolsConfig?
Section titled “builtInToolsConfig?”
optionalbuiltInToolsConfig?:BuiltInToolsConfig
Defined in: core/dist/config/types.d.ts:356
canInterruptInferenceWithEsc
Section titled “canInterruptInferenceWithEsc”canInterruptInferenceWithEsc:
boolean
Defined in: core/dist/config/types.d.ts:302
Allow inference to be interrupted with esc. Only has an effect in TTY mode.
commands?
Section titled “commands?”
optionalcommands?:object
Defined in: core/dist/config/types.d.ts:361
optionalapi?:object
api.approvals?
Section titled “api.approvals?”
optionalapprovals?:ApprovalsConfig
§9.1 — per-command approvals posture. It overrides only the fields it NAMES: mode,
rater, raterTimeoutMs and allow replace the root’s, while deny and escalate
concatenate with it. See GthConfig.approvals.
api.builtInTools?
Section titled “api.builtInTools?”
optionalbuiltInTools?:BuiltInToolsSetting
api.cors?
Section titled “api.cors?”
optionalcors?:object
api.cors.allowHeaders?
Section titled “api.cors.allowHeaders?”
optionalallowHeaders?:string
api.cors.allowMethods?
Section titled “api.cors.allowMethods?”
optionalallowMethods?:string
api.cors.allowOrigin?
Section titled “api.cors.allowOrigin?”
optionalallowOrigin?:string
api.filesystem?
Section titled “api.filesystem?”
optionalfilesystem?:string[] |"none"|"all"|"read"
api.port?
Section titled “api.port?”
optionalport?:number
optionalask?:CommandToolingConfig
optionalchat?:CommandToolingConfig
optionalcode?:CommandToolingConfig
gth code — interactive coding session. Carries the do-the-job tool/filesystem knobs; the
dev/shell tools (CFG-18) are configured via CommandToolingConfig.builtInTools.
optionalexec?:CommandToolingConfig
gth exec — prompt-as-script runtime. Like code, an exec run may need to actually
do the job (read/write files, run commands), so it carries the same tool/filesystem knobs.
optionalpr?:PrCommandConfig
review?
Section titled “review?”
optionalreview?:CommandToolingConfig&object
Type Declaration
Section titled “Type Declaration”contentSource?
Section titled “contentSource?”
optionalcontentSource?:string
rating?
Section titled “rating?”
optionalrating?:RatingConfig
requirementSource?
Section titled “requirementSource?”
optionalrequirementSource?:string
commit?
Section titled “commit?”
optionalcommit?:object
Defined in: core/dist/config/types.d.ts:404
GS2-35 — identity for the Co-Authored-By trailer of agent-authored git commits. Gaunt Sloth
has no dedicated commit tool (it commits via run_shell_command), so this identity is injected
into the code-mode system prompt, which instructs the agent to co-author commits as this account
and NEVER as the underlying model. Optional and defaulted: when unset (or a field is unset) the
agent co-authors as DEFAULT_COMMIT_CO_AUTHOR_NAME <DEFAULT_COMMIT_CO_AUTHOR_EMAIL>.
coAuthor?
Section titled “coAuthor?”
optionalcoAuthor?:object
coAuthor.email?
Section titled “coAuthor.email?”
optionalemail?:string
coAuthor.name?
Section titled “coAuthor.name?”
optionalname?:string
consoleLevel?
Section titled “consoleLevel?”
optionalconsoleLevel?:StatusLevel
Defined in: core/dist/config/types.d.ts:320
Console logging level. Only messages at or above this level will be displayed. Valid values: ‘debug’, ‘info’, ‘display’, ‘success’, ‘warning’, ‘error’, ‘stream’ Default: ‘info’ (not debug)
contentSource
Section titled “contentSource”contentSource:
string
Defined in: core/dist/config/types.d.ts:144
Content source type. Source used to fetch content (usually diff) for review or pr command.
contentSourceConfig?
Section titled “contentSourceConfig?”
optionalcontentSourceConfig?:Record<string,unknown>
Defined in: core/dist/config/types.d.ts:323
customTools?
Section titled “customTools?”
optionalcustomTools?:CustomToolsConfig
Defined in: core/dist/config/types.d.ts:321
debugDump?
Section titled “debugDump?”
optionaldebugDump?:object
Defined in: core/dist/config/types.d.ts:440
GS2-47 — controls the shared secret-redaction pass applied to /debug-dump archives. Default
ON (omitted = redact): secret-named env-var values, inline config secrets, provider-key/auth
patterns and sensitive config fields are masked before any artifact hits disk. Set
debugDump.redact: false (or run /debug-dump --unsafe-no-redact) to write a RAW archive, which
the command flags with a loud “may contain secrets” warning. Defaulted at the read site (not in
DEFAULT_CONFIG) to avoid churning the effective-config snapshot.
redact?
Section titled “redact?”
optionalredact?:boolean
debugLog?
Section titled “debugLog?”
optionaldebugLog?:boolean
Defined in: core/dist/config/types.d.ts:307
Log messages and events to gaunt-sloth.log,
use llm.verbose or gth --verbose as more intrusive option, setting verbose to LangChain / LangGraph
filesystem
Section titled “filesystem”filesystem:
string[] |"none"|"all"|"read"
Defined in: core/dist/config/types.d.ts:185
history?
Section titled “history?”
optionalhistory?:object
Defined in: core/dist/config/types.d.ts:123
GS2-7 (B20) — local, opt-in session history store. DEFAULT OFF (absent = disabled): a default
run persists nothing and behaves exactly as before. When enabled, each run is recorded to a
local SQLite DB (~/.gsloth/history.db by default, overridable via dbPath) for
gth history search / gth insights. Local only — no telemetry leaves the machine.
dbPath?
Section titled “dbPath?”
optionaldbPath?:string
enabled?
Section titled “enabled?”
optionalenabled?:boolean
identityProfile?
Section titled “identityProfile?”
optionalidentityProfile?:string
Defined in: core/dist/config/types.d.ts:164
Separate identity profile.
May include separate identity, guidelines and command protocol,
making gsloth behave as an agent different from default profile behaviour.
for example, devops profile to detect changes such as properties and environment variables.
Custom config can still win over this one.
This setting requires .gsloth/.gsloth-settings directory to exist.
includeCurrentDateAfterGuidelines
Section titled “includeCurrentDateAfterGuidelines”includeCurrentDateAfterGuidelines:
boolean
Defined in: core/dist/config/types.d.ts:168
Whether to include the current date in the project review instructions or not.
injectModelContext?
Section titled “injectModelContext?”
optionalinjectModelContext?:boolean
Defined in: core/dist/config/types.d.ts:431
GS2-34 — inject the resolved active provider:model identity into the assembled system prompt
so the agent knows which model is serving it (to answer “what model are you?” and reason about
its own capabilities/limits). Default ON (omitted = inject). Opt out with
injectModelContext: false to keep reproducible / model-agnostic runs (e.g. review) blind to
the identity — when off, the assembled prompt is exactly as it is without this feature. Applies
in ALL modes (unlike the code-mode-only cwd/os-shell/commit notes). Defaulted at the read site
(not in DEFAULT_CONFIG) to avoid churning the effective-config snapshot.
llm:
BaseChatModel
Defined in: core/dist/config/types.d.ts:100
mcpServers?
Section titled “mcpServers?”
optionalmcpServers?:Record<string,unknown>
Defined in: core/dist/config/types.d.ts:329
MCP (Model Context Protocol) server connections. Allows connecting to external MCP servers including those requiring OAuth.
https://modelcontextprotocol.io/
memory?
Section titled “memory?”
optionalmemory?:object
Defined in: core/dist/config/types.d.ts:131
GS2-7 (B21) — opt-in file-backed memory (MEMORY.md / USER.md). DEFAULT OFF. Forward-compat toggle only; the feature is a deferred follow-up.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
middleware?
Section titled “middleware?”
optionalmiddleware?:unknown[]
Defined in: core/dist/config/types.d.ts:259
Middleware configuration for LangChain v1. Middleware provides hooks to intercept and control agent execution at critical points.
Middleware can be:
- Predefined middleware (string or config object) - works in both JSON and JS configs
- Custom middleware objects - only available in JS configs
Example (JSON config):
{ "middleware": [ "summarization", { "name": "anthropic-prompt-caching", "ttl": "5m" } ]}Example (JS config):
{ middleware: [ "summarization", { beforeModel: (state) => { /* custom logic */ return state; } } ]}Available predefined middleware:
anthropic-prompt-caching: Reduces API costs by caching prompts (Anthropic only)summarization: Condenses conversation history when approaching token limits
modelDisplayName?
Section titled “modelDisplayName?”
optionalmodelDisplayName?:string
Defined in: core/dist/config/types.d.ts:410
modelProviderType?
Section titled “modelProviderType?”
optionalmodelProviderType?:string
Defined in: core/dist/config/types.d.ts:421
GS2-53 — the configured provider type string (openrouter/deepseek/xai/anthropic/…),
stashed by the loader from the raw llm.type before the built BaseChatModel replaces the raw
spec. INTERNAL (loader-set, never user-supplied), so it is deliberately absent from the config
schema. import(‘#src/utils/systemPromptNotes.js’).resolveModelIdentity PREFERS this over
the live model’s _llmType() for the injected identity, because OpenAI-compatible shims
(openrouter/deepseek/xai all extend ChatOpenAI) report _llmType() === 'openai' and would
otherwise mislabel the provider half. Absent for module configs (which hand us an already-built
LLM with no raw type), where resolution falls back to the guarded _llmType().
noDefaultPrompts?
Section titled “noDefaultPrompts?”
optionalnoDefaultPrompts?:boolean
Defined in: core/dist/config/types.d.ts:184
If true, only use user-provided system prompts. Do not fall back to the
bundled .gsloth.*.md prompt files shipped with the installation.
This applies to all .gsloth.*.md files (backstory, system, chat, code, guidelines, review).
organization?
Section titled “organization?”
optionalorganization?:object
Defined in: core/dist/config/types.d.ts:174
Organisation name, locale and timezone. Only used with includeCurrentDateAfterGuidelines. timeZone and locale should be in format supported by Intl.DateTimeFormat
locale?
Section titled “locale?”
optionallocale?:string
optionalname?:string
timezone?
Section titled “timezone?”
optionaltimezone?:string
output?
Section titled “output?”
optionaloutput?:object
Defined in: core/dist/config/types.d.ts:470
GS2-63 — output surface controls.
output.header DEFAULTS ON (omitted = show). Set false to suppress the technical run-header
preamble — the Workdir/Model/Tools/Middleware status block, the Press Escape or Q to interrupt
hint, and their surrounding blank lines — in NON-TUI text modes (--no-tui, ask, exec,
eval, pr, review, piped/CI), so captured stdout and log diffs stay clean. The interactive
TUI ignores the setting and always shows the header. Only the preamble is suppressed — never
model/tool output, errors, or config-validation warnings, and never the live Thinking…
indicator. Defaulted at the read site (!== false), not in DEFAULT_CONFIG, to avoid
churning the effective-config snapshot.
header?
Section titled “header?”
optionalheader?:boolean
prompts?
Section titled “prompts?”
optionalprompts?:Partial<Record<PromptSegmentName,PromptSegmentSetting>>
Defined in: core/dist/config/types.d.ts:155
GS2-43 — the unified prompt-segment config (see PromptsConfig). Each of the seven
segments (backstory | guidelines | system | chat | code | exec | review) accepts a string
path (e.g. "guidelines": "AGENTS.md") or an object ({ path?, enabled?, mode? }). When a
segment is omitted its default-named file / bundled default applies unchanged.
recursionLimit?
Section titled “recursionLimit?”
optionalrecursionLimit?:number
Defined in: core/dist/config/types.d.ts:314
LangGraph recursion limit for an agent run — the maximum number of super-steps (model ↔ tool round-trips) before the graph throws. Defaults to 1000, which suits long coding chains; embodied / tight-loop consumers can lower it so a stuck run fails fast and visibly instead of grinding.
reporters?
Section titled “reporters?”
optionalreporters?:Record<string,string>
Defined in: core/dist/config/types.d.ts:503
BATCH-19 — custom gth eval reporters, keyed by the NAME they are selected under
(gth eval … --reporter <name>). Each value is a MODULE PATH, resolved relative to the project
dir, whose default export is an EvalReporterFactory (() => EvalReporter). Loaded and
registered through the SAME seam the bundled reporters (text, junit) use, so a config
reporter can also override a built-in of the same name (config wins). A missing file, a failed
import, or a non-function default export is a hard error (the eval harness exits 2). Trusted:
it is the user’s own config, which already executes arbitrary JS.
requirementSource
Section titled “requirementSource”requirementSource:
string
Defined in: core/dist/config/types.d.ts:148
Requirement source type. Source used to fetch requirements for review or pr command.
requirementSourceConfig?
Section titled “requirementSourceConfig?”
optionalrequirementSourceConfig?:Record<string,unknown>
Defined in: core/dist/config/types.d.ts:322
streamOutput
Section titled “streamOutput”streamOutput:
boolean
Defined in: core/dist/config/types.d.ts:265
Stream output. Some models do not support streaming. Set value to false for them.
streamSessionInferenceLog
Section titled “streamSessionInferenceLog”streamSessionInferenceLog:
boolean
Defined in: core/dist/config/types.d.ts:298
Stream session log instead of writing it when inference streaming is complete. (only works when streamOutput is true)
subagents?
Section titled “subagents?”
optionalsubagents?:SubagentProfileSpec[]
Defined in: core/dist/config/types.d.ts:512
GS2-33 — profile-backed subagents. Each entry names a subagent and the named config profile the CHILD resolves when the parent spawns it,
so a subagent can run under a different model/tools/prompt than the parent (a cheap profile for
recall/search while the parent runs on a strong model). Honored by the deep (deepagents) backend
— its task tool gains one selectable subagent per entry; the lean backend’s own subagent
primitive lands in GS2-25.
optionaltls?:object
Defined in: core/dist/config/types.d.ts:336
TLS trust for outbound HTTPS. Primarily so an http-transport MCP server behind a
private/corporate CA can be reached without prepending NODE_EXTRA_CA_CERTS on every
invocation. The mechanism is a process-global undici dispatcher, so it applies to ALL
outbound fetch this process makes (LLM provider calls included), not only MCP.
extraCaCerts?
Section titled “extraCaCerts?”
optionalextraCaCerts?:string[]
Extra CA certificate file(s) to trust IN ADDITION to Node’s built-in roots. Paths resolve
relative to the project dir (or ~/absolute). Additive — never removes a default root.
rejectUnauthorized?
Section titled “rejectUnauthorized?”
optionalrejectUnauthorized?:boolean
DANGER — false disables TLS certificate verification for ALL outbound HTTPS this process
makes, not just MCP. Escape hatch only; a loud security warning is emitted every session.
toolLoopGuard?
Section titled “toolLoopGuard?”
optionaltoolLoopGuard?:boolean| {halt?:boolean;threshold?:number;warn?:boolean; }
Defined in: core/dist/config/types.d.ts:489
EXT-36 — the tool-loop guard: a repeated-identical-(tool, args) / no-progress detector that
runs as a lean-backend beforeModel middleware, the orthogonal sibling of GS2-36’s
consecutive-tool-ERROR budget. It catches the case GS2-36 leaves open — a model re-issuing the
SAME call verbatim, whether it keeps erroring or keeps “succeeding” with the same result.
falsedisables it entirely.true/ omitted → WARN on, HALT off, default threshold (DEFAULT_TOOL_LOOP_THRESHOLD).- object → per-field:
warn(default ON) injects a control-flow-free nudge at the threshold;halt(default OFF, opt-in) ends the run cleanly (jumpTo:'end', never a throw) at the threshold;thresholdis the number of consecutive identical calls that trip it.
WARN is provably harmless (no routing effect, one nudge per signature per streak). The WARN-on default is applied at the read site (not in DEFAULT_CONFIG) to avoid churning the effective-config snapshot.
tools?
Section titled “tools?”
optionaltools?:StructuredToolInterface<ToolInputSchemaBase,any,any>[] |BaseToolkit[] |ServerTool[]
Defined in: core/dist/config/types.d.ts:212
useColour
Section titled “useColour”useColour:
boolean
Defined in: core/dist/config/types.d.ts:286
Use colour in output
useMouse
Section titled “useMouse”useMouse:
boolean
Defined in: core/dist/config/types.d.ts:293
Enable terminal mouse reporting in the Ink TUI, making its affordances clickable.
On by default in an interactive terminal. While it is on the terminal’s own text selection
needs a modifier (Shift, or Option in some macOS terminals) — set this to false, or set
GTH_NO_MOUSE, to get unmodified selection back.
writeBinaryOutputsToFile
Section titled “writeBinaryOutputsToFile”writeBinaryOutputsToFile:
boolean
Defined in: core/dist/config/types.d.ts:282
Whether binary model outputs should be written to files instead of printed inline.
When enabled, supported binary content blocks are materialized as gth_*.<ext> files.
writeOutputToFile
Section titled “writeOutputToFile”writeOutputToFile:
string|boolean
Defined in: core/dist/config/types.d.ts:277
Should the output be written to md file.
(e.g. gth_2025-07-26_22-59-06_REVIEW.md).
Defaults to false (no file is written); set to true for the standard
gth_<timestamp>_<COMMAND>.md name.
Can be set to false with -wn or -w0
Can be set to a specific filename or path by passing a string:
- Bare filenames (e.g.
"review.md") are placed in.gsloth/when it exists, otherwise project root - Paths with separators (e.g.
"./review.md"or"reviews/last.md") are always relative to project root Please note the string does not accept absolute path, but allows to exit project with..if necessary.