# Project-scoped Codex defaults for Trellis workflows.
# Codex merges this layer after the user-level config when the project
# is marked as a trusted project. To trust this project, add it under
# `[projects]` in ~/.codex/config.toml, e.g.:
#
#   [projects."/abs/path/to/this/repo"]
#   trust_level = "trusted"
#
# Without trust, the [features] block below is loaded but disabled.

# Keep AGENTS.md as the primary project instruction file.
project_doc_fallback_filenames = ["AGENTS.md"]

# Codex hooks (`hooks.json` in this directory) only fire when the user
# has enabled them in their USER-level config: `[features].hooks = true`
# in ~/.codex/config.toml (Codex 0.129+; legacy name: `codex_hooks = true`,
# still works but emits a deprecation warning on 0.129+). Project-level
# config.toml cannot set feature flags; they must be user-level.
# Codex 0.129+ additionally gates each installed hook behind a one-time
# `/hooks` TUI review; until the user approves it, the hook stays inactive.

# multi_agent_v2 forces structured subagent orchestration with the
# `wait` tool — parent must block on terminal status before acting,
# instead of cancelling / re-spawning. Incompatible with
# [agents].max_threads (codex will reject the combination).
# `enabled = true` is required inside the table — the table form does
# NOT auto-enable the feature without it.
# - max_concurrent_threads_per_session: bumps default 4 → 6.
# - min/default/max_wait_timeout_ms: keep Codex's merged timeout config
#   valid while raising the default wait to 8 min. Codex 0.131+ validates
#   min <= default <= max.
[features.multi_agent_v2]
enabled = true
max_concurrent_threads_per_session = 6
min_wait_timeout_ms = 480000
default_wait_timeout_ms = 480000
max_wait_timeout_ms = 3600000
