DGCDocs
Reference/Configuration

config.json, models, context, providers

Configuration#

Global settings live in ~/.dgc/config.json; per-project overrides live in a project's .dgc/. Most settings have a slash command, so you rarely edit the file by hand.

Useful keys:

  • base_url, model — the endpoint and model (/connect, /model). Credentials live in

owner-only ~/.dgc/secrets.json, VS Code SecretStorage, or DGC_API_KEY / the other DGC_*_API_KEY environment references; they are not written into normal config.

  • mode, thinking — permission mode and reasoning effort. thinking is **off

by default (a coding agent should act, not deliberate at length) and accepts off · low · medium · high · xhigh. DGC sends the correct reasoning switch per provider automatically — so off genuinely turns reasoning off on Ollama, vLLM, OpenAI, etc., and a set level reaches Qwen3-family llama.cpp/unsloth templates (which read it from inside chat_template_kwargs). Reasoning models (o-series, DeepSeek-R1, qwen-thinking) do better on hard tasks with /think high. See the Thinking & reasoning** guide.

  • show_reasoning, preserve_thinkingshow_reasoning (/thoughts show|hide)

shows the model's thinking, muted, in the transcript. preserve_thinking (/preserve-thinking on|off, default off) re-embeds the prior turn's reasoning in the context sent back so a compatible/local model keeps its own thinking across turns (costs tokens; only the OpenAI-compatible/chat_completions path — Anthropic and Ollama already round-trip their reasoning natively).

  • think_budget_tokens, max_tokens — safety backstops: a reasoning phase that

runs away with no output is aborted + retried with less reasoning (think_budget_tokens, 0=off); output is capped at max_tokens (length-truncation auto-continues, 0=don't send).

  • api_mode, provider_state, prompt_cache — transport and continuity. auto selects native

Ollama chat for detected Ollama endpoints, Anthropic Messages for Anthropic, OpenAI Responses for OpenAI, and Chat Completions for compatible servers. Use api_mode: ollama or api_mode: anthropic only when a proxy hides its provider identity. Anthropic Messages preserves signed thinking and grouped tool-result continuation blocks locally; it never sends the key as Bearer authentication. Responses defaults to stateless (store: false) with local encrypted-reasoning replay and privacy-safe cache routing. Choose provider_state: server only when provider-side response storage is acceptable.

  • provider_capabilities, capability_cache_ttl_s — explicit feature overrides and the bounded

interval before DGC retries a capability that an endpoint/model rejected.

  • context_size — the requested operating window. Known model selections apply a

memory-conscious recommendation; authoritative provider metadata clamps impossible values but never silently expands a local Ollama allocation. Long sessions compact at compact_threshold of the effective value.

  • search_timeout — bounded 1–60 second lifetime for internal grep/glob discovery. DGC uses

ripgrep without a shell when available and a link-safe bounded fallback otherwise.

  • session_redaction — on by default. Durable transcripts, checkpoint conversation blobs, goals,

titles, and plans receive an additional credential-redaction pass. Live provider/tool/editor/ACP masking is always enforced. Exact file rewind snapshots remain byte-for-byte unchanged inside the owner-private session so /rewind cannot corrupt a file.

  • tool_profileadaptive (default) keeps all core coding tools while activating web, artifact,

skill-install, memory, goal, and delegation tools from explicit turn/standing-goal intent. Use full to expose the whole execution catalog on every model request.

  • code_actionoff by default. When true, DGC advertises a python power tool that runs

code in a persistent per-session interpreter (variables/imports survive across calls). See the Python code-action guide. It executes arbitrary code, so it is gated by the same approval path as bash (asked in default/acceptEdits, denied in plan) and is never shown until you opt in.

  • theme, background — appearance (background defaults to *inherit*, never

repainting your terminal).

  • suggest — ghost-text next-prompt suggestions (Tab/→ to accept). Auxiliary title/suggestion

requests wait for fleet-wide idle time and are canceled before foreground work; aux_idle_delay_ms controls the grace period.

  • mcp_servers, hooks, fallback_model, subagent_model — extend the agent. When a fallback or

sub-agent uses another endpoint, its transport is inferred independently instead of inheriting a forced main-provider mode; set fallback_api_mode or subagent_api_mode only to override that. Lifecycle-hook batches are capped at 32 entries and one 20-second deadline, drain only a bounded redacted head/tail, own a process group and checkout mutation lease, and honor /sandbox.

  • subagent_worktree_root — optional private storage for automatic delegated checkouts; empty uses

~/.dgc/worktrees. It must be outside the source repository.

  • fleet_worktree_root — optional private storage for automatically isolated TUI agents; empty uses

~/.dgc/fleet-worktrees. Conversation resume state remains scoped to the source project, and changed managed checkouts are retained rather than force-removed.

  • max_parallel_tasks — bounded task fan-out (default 4, maximum 8; set 1 to disable). In a

Git-backed full-auto turn, two or more independent task calls emitted together are snapshotted from one parent baseline, run concurrently, and integrated in call order. Hooks, interactive permission modes, mixed tool batches, and non-Git projects keep the normal serial path.

  • language_servers, code_intel_timeout, code_intel_lsp_idle_s — optional stdio LSP

commands for richer definitions, references, symbols, and diagnostics. Keys may be a language (python) or extension (.py): {"language_servers":{"python":{"command":"pyright-langserver","args":["--stdio"]}}}. Without one, the bounded dependency-free static analyzer remains available. Configured servers receive a minimal environment, run without a shell, and are serialized per project/server spec. DGC keeps at most four configured sessions warm for 120 seconds by default, reaps them when idle, and retires failed sessions. Explicitly approved external-file queries always stay one-shot; set code_intel_lsp_idle_s to 0 for one-shot isolation everywhere.

Credentials#

Keys never live in config.json. api_key, search_api_key, subagent_api_key and fallback_api_key are written to ~/.dgc/secrets.json with owner-only permissions, and each can be supplied by environment variable instead (DGC_API_KEY, DGC_SEARCH_API_KEY, …). On the command line, --api-key-env NAME reads a key from the environment without persisting it at all. fallback_base_url and subagent_base_url point the fallback and sub-agent at their own endpoints.

Sampling and limits#

Sampling keys are empty by default, which means *use the endpoint's own defaults* — set one only when you want to override it.

  • temperature, top_p, top_k, min_p — sampling parameters, passed through when set.
  • max_turns (default 80) — tool-use iterations the agent may take in one turn.
  • turn_budget_s (default 0, meaning no limit) — wall-clock budget for a turn. The agent

reserves the tail of this budget to converge and persist rather than being cut off mid-edit.

  • request_timeout (default 1800) — seconds to wait on a single provider response.
  • bash_timeout (default 120) — per-command shell timeout.
  • approval_timeout_s (default 300) — how long a permission prompt waits before giving up.
  • ollama_keep_alive (default 30m) — how long Ollama keeps the model resident between turns.
  • prompt_cache_key — an explicit cache key for providers that support prompt caching.
  • search_provider (default duckduckgo) — which backend answers the agent's web searches.
  • search_url — a custom endpoint for a self-hosted search backend; empty uses the provider's own.
  • search_timeout bounds every query, and search_api_key lives in secrets.json (above).

Sandbox#

  • sandbox (default false) — run shell commands inside the sandbox.
  • sandbox_network (default false) — allow network access from sandboxed commands.
  • sandbox_env_allow (default []) — environment variable names to pass through to sandboxed

commands. Everything else is withheld.

Artifacts#

  • artifact_autostart (default true) — serve artifacts automatically as they are produced.
  • artifact_port (default 45000) — the single localhost port every artifact shares.
  • artifact_bind (default localhost) — the bind address. Set it to a LAN address to preview

from another device on your own network.

  • artifact_hostname — the hostname used when building the printed URL, if it differs from the

bind address.

  • plan_artifact (default true) — render proposed plans as an artifact page.
  • artifact_in_plan (default false) — also serve artifacts while in plan mode.

Unattended runs#

  • autonomous_gate — a check command that must exit 0 before the agent may stop a turn.
  • autonomous_max_turns (default 30) — bound on failed gate retries.
  • verify_before_done (default false) and verify_command — run a command and feed a failure

back before allowing the turn to end.

Each has a command-line equivalent; see Command line.

Subscriptions#

  • subscription_engine — which vendor CLI drives the turn.
  • subscription_model, subscription_effort — model and effort passed through to that CLI.

Appearance#

  • logo_animation (default true) — the animated mark on the welcome screen. Turn it off for a

static logo.