.forge.toml
ForgeCode's global configuration lives at ~/.forge/.forge.toml. This file controls limits, model sampling parameters, retry behaviour, HTTP settings, context compaction, and automatic updates.
To open it in your default editor, run :config-edit from any ForgeCode session:
:config-edit
You can also edit the file directly with any text editor. Changes take effect the next time ForgeCode starts.
$schema https://forgecode.dev/schema.json
# Whether to automatically open HTML dump files in the browser
auto_open_dump = false
# Maximum number of conversations to show in list
max_conversations = 100
# Maximum number of file extensions to include in the system prompt
max_extensions = 15
# Maximum characters for fetch content
max_fetch_chars = 50000
# Maximum number of files that can be read in a single batch operation
max_file_read_batch_size = 50
# Maximum file size in bytes for operations
max_file_size_bytes = 104857600
# Maximum image file size in bytes for binary read operations
max_image_size_bytes = 262144
# Maximum characters per line for file read operations
max_line_chars = 2000
# Maximum number of files read concurrently in parallel operations
max_parallel_file_reads = 64
# Maximum number of lines to read from a file
max_read_lines = 2000
# Maximum number of requests that can be made in a single turn
max_requests_per_turn = 100
# The maximum number of lines returned for FSSearch
max_search_lines = 1000
# Maximum bytes allowed for search results
max_search_result_bytes = 10240
# Maximum number of results to return from initial vector search
max_sem_search_results = 100
# Maximum characters per line for shell output
max_stdout_line_chars = 500
# Maximum lines for shell output prefix
max_stdout_prefix_lines = 100
# Maximum lines for shell output suffix
max_stdout_suffix_lines = 100
# Maximum tokens the model may generate per response for all agents (1–100,000)
max_tokens = 20480
# Maximum tool failures per turn before the orchestrator forces completion
max_tool_failure_per_turn = 3
# TTL in seconds for the model API list cache
model_cache_ttl_secs = 604800
# Whether the application is running in restricted mode; when true, tool execution requires explicit permission grants
restricted = false
# Top-k parameter for relevance filtering during semantic search
sem_search_top_k = 10
# URL for the indexing server
services_url = "https://api.forgecode.dev/"
# Whether tool use is supported in the current environment; when false, tool calls are disabled regardless of agent configuration
tool_supported = true
# Maximum execution time in seconds for a single tool call
tool_timeout_secs = 300
# Top-k vocabulary cutoff for all agents; restricts sampling to the k highest-probability tokens (1–1000)
top_k = 30
# Nucleus sampling threshold for all agents; limits token selection to the top cumulative probability mass (0.0–1.0)
top_p = 0.8
[retry]
# Backoff multiplication factor for each retry attempt
backoff_factor = 2
# Initial backoff delay in milliseconds for retry operations
initial_backoff_ms = 200
# Maximum number of retry attempts
max_attempts = 8
# Minimum delay in milliseconds between retry attempts
min_delay_ms = 1000
# HTTP status codes that should trigger retries
status_codes = [429, 500, 502, 503, 504, 408, 522, 520, 529]
# Whether to suppress retry error logging and events
suppress_errors = false
[http]
# Accept invalid certificates
accept_invalid_certs = false
# Adaptive window sizing for improved flow control
adaptive_window = true
# Connection timeout in seconds
connect_timeout_secs = 30
# Use Hickory DNS resolver
hickory = false
# Keep-alive interval in seconds
keep_alive_interval_secs = 60
# Keep-alive timeout in seconds
keep_alive_timeout_secs = 10
# Keep-alive while connection is idle
keep_alive_while_idle = true
# Maximum number of HTTP redirects to follow
max_redirects = 10
# Connection pool idle timeout in seconds
pool_idle_timeout_secs = 90
# Maximum idle connections per host in the connection pool
pool_max_idle_per_host = 5
# Read timeout in seconds
read_timeout_secs = 900
# TLS backend to use ("default" or "rustls")
tls_backend = "default"
[compact]
# Maximum percentage of the context that can be summarized during compaction (0.0–1.0)
eviction_window = 0.2
# Maximum number of tokens to keep after compaction
max_tokens = 2000
# Maximum number of messages before triggering compaction
message_threshold = 200
# Whether to trigger compaction when the last message is from a user
on_turn_end = false
# Number of most recent messages to preserve during compaction; these messages won't be considered for summarization
retention_window = 6
# Maximum number of tokens before triggering compaction
token_threshold = 100000
[updates]
# Whether to automatically install updates without prompting
auto_update = true
# How frequently ForgeCode checks for updates ("daily", "weekly", or "always")
frequency = "daily"