- OpenCode
- Codex
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"default_agent": "plan",
"subagent_depth": 1,
"compaction": {
"auto": true,
"prune": true,
"preserve_recent_tokens": 8000,
"reserved": 172000
},
"tool_output": {
"max_lines": 2000,
"max_bytes": 51200
},
"agent": {
"plan": {
"description": "High-intelligence planning and architecture mode",
"mode": "primary",
"model": "openai/gpt-6-astra",
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "concise",
"prompt": "Operate as a pragmatic planning and architecture agent. Inspect enough relevant repository context to understand the request and its dependencies before proposing changes. Broaden the investigation when uncertainty, cross-cutting behavior, or architectural impact warrants it. Do not modify project files. Use the explore subagent proactively for repository discovery and codebase investigation. Use the scout subagent for external documentation, dependency source, upstream implementation, and API research. Produce concrete implementation plans with affected files, architectural decisions, risks, edge cases, and verification steps. Prefer concise, actionable output over exposition.",
"permission": {
"*": "deny",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": "deny",
"bash": {
"*": "ask",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"todowrite": "allow",
"doom_loop": "ask",
"task": {
"*": "deny",
"explore": "allow",
"scout": "allow"
}
}
},
"build": {
"description": "Implementation mode for making and verifying changes",
"mode": "primary",
"model": "openai/gpt-5.6-sol",
"reasoningEffort": "medium",
"textVerbosity": "low",
"reasoningSummary": "concise",
"prompt": "Operate as a pragmatic implementation agent. Implement the requested change completely rather than only describing it. Inspect relevant existing code first, preserve project conventions, keep changes focused, and verify the result with appropriate tests, type checks, builds, or other repository-specific checks. Use the explore subagent for focused repository discovery, the scout subagent for external documentation and dependency research, and the general subagent for independent multi-step delegated work when parallelization or separation of concerns is useful. Keep commentary concise.",
"permission": {
"*": "ask",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": {
"*": "allow",
"*.env": "ask",
"*.env.*": "ask",
"*.env.example": "allow"
},
"bash": {
"*": "ask",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"todowrite": "allow",
"doom_loop": "ask",
"task": {
"*": "deny",
"general": "allow",
"explore": "allow",
"scout": "allow"
}
}
},
"review": {
"description": "Independent read-only code review using GLM-5.3-Flash",
"mode": "primary",
"model": "bitdeer/zai-org/GLM-5.3-Flash",
"reasoningEffort": "max",
"prompt": "Operate as a pragmatic independent code reviewer. Review the current changes for correctness, regressions, security issues, edge cases, maintainability, and missing tests. Prioritize concrete defects over stylistic preferences. Use the explore subagent when additional repository investigation is needed and the scout subagent when external documentation, dependency behavior, or upstream source must be verified. Cite files and locations whenever possible. Do not modify project files.",
"permission": {
"*": "deny",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": "deny",
"bash": {
"*": "ask",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"todowrite": "allow",
"doom_loop": "ask",
"task": {
"*": "deny",
"explore": "allow",
"scout": "allow"
}
}
},
"general": {
"description": "General implementation subagent for delegated multi-step work",
"mode": "subagent",
"model": "openai/gpt-5.6-luna",
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "concise",
"prompt": "Operate as a focused implementation subagent. Complete the delegated task within its stated scope. Inspect relevant existing code before changing it, preserve project conventions, keep changes narrowly scoped, and verify work when practical. Do not delegate further. Avoid unrelated refactors. Do not read or modify secrets or environment files unless explicitly approved.",
"permission": {
"*": "ask",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": {
"*": "allow",
"*.env": "ask",
"*.env.*": "ask",
"*.env.example": "allow"
},
"bash": {
"*": "ask",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"doom_loop": "ask",
"task": "deny"
}
},
"explore": {
"description": "Read-only repository exploration and codebase discovery subagent",
"mode": "subagent",
"model": "openai/gpt-5.6-luna",
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "concise",
"prompt": "Operate as a focused read-only repository exploration agent. Locate relevant files, symbols, implementations, call paths, tests, configuration, and architectural relationships. Gather enough evidence to answer the delegated investigation accurately. Prefer repository-native search and language tooling. Do not modify files, execute commands that alter repository or system state, or delegate further. Return concise findings with file paths and locations whenever possible.",
"permission": {
"*": "deny",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": "deny",
"bash": {
"*": "deny",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"task": "deny"
}
},
"scout": {
"description": "Read-only external documentation, dependency, upstream, and API research subagent",
"mode": "subagent",
"model": "openai/gpt-5.6-luna",
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "concise",
"prompt": "Operate as a focused research subagent for external documentation, APIs, dependency behavior, upstream source, standards, release notes, and implementation details. Prefer primary sources and upstream documentation. Inspect local dependency source when useful and permitted. Distinguish verified facts from inference. Do not modify project files, execute state-changing commands, or delegate further. Return concise findings with source references and implementation implications.",
"permission": {
"*": "deny",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"glob": "allow",
"grep": "allow",
"list": "allow",
"lsp": "allow",
"edit": "deny",
"bash": {
"*": "deny",
"git status*": "allow",
"git diff*": "allow",
"git log*": "allow",
"git show*": "allow"
},
"external_directory": "ask",
"webfetch": "allow",
"websearch": "allow",
"skill": "allow",
"question": "allow",
"task": "deny"
}
},
"title": {
"disable": true
}
},
"provider": {
"openai": {
"models": {
"gpt-6-astra": {
"limit": {
"context": 1000000,
"input": 700000,
"output": 128000
}
},
"gpt-5.6-sol": {
"limit": {
"context": 1000000,
"input": 700000,
"output": 128000
}
},
"gpt-5.6-luna": {
"limit": {
"context": 1000000,
"input": 700000,
"output": 128000
}
}
}
},
"bitdeer": {
"npm": "@ai-sdk/openai-compatible",
"name": "Bitdeer AI",
"options": {
"baseURL": "https://api-inference.bitdeer.ai/v1",
"apiKey": "{env:BITDEER_API_KEY}"
},
"models": {
"zai-org/GLM-5.3-Flash": {
"name": "GLM-5.3-Flash",
"reasoning": true,
"temperature": true,
"tool_call": true,
"attachment": true,
"interleaved": {
"field": "reasoning_content"
},
"modalities": {
"input": [
"text",
"image",
"video"
],
"output": [
"text"
]
},
"limit": {
"context": 1000000,
"input": 700000,
"output": 128000
},
"options": {
"reasoningEffort": "high"
},
"variants": {
"low": {
"reasoningEffort": "low"
},
"medium": {
"disabled": true
},
"high": {
"reasoningEffort": "high"
},
"max": {
"reasoningEffort": "max"
}
}
}
}
}
}
}
config.toml
#:schema https://developers.openai.com/codex/config-schema.json
model = "gpt-5.6-sol"
model_context_window = 1000000
model_auto_compact_token_limit = 700000
model_auto_compact_token_limit_scope = "total"
tool_output_token_limit = 8000
project_doc_max_bytes = 65536
model_reasoning_effort = "low"
plan_mode_reasoning_effort = "high"
model_verbosity = "low"
model_reasoning_summary = "concise"
personality = "pragmatic"
default_permissions = ":workspace"
approval_policy = "on-request"
approvals_reviewer = "auto_review"
web_search = "live"
[agents]
enabled = true
max_concurrent_threads_per_session = 4
default_subagent_model = "gpt-5.6-luna"
default_subagent_reasoning_effort = "max"
[skills]
max_context_tokens = 8000
[tools]
web_search = { context_size = "medium" }
[tui]
status_line = [
"model",
"used-tokens",
"total-input-tokens",
"total-output-tokens",
"five-hour-limit",
"weekly-limit",
"context-remaining",
"task-progress",
"fast-mode"
]