pub struct SupervisorConfig {
pub enabled: bool,
pub agent: String,
pub verdict_on_block: String,
pub constitution_path: Option<PathBuf>,
pub skip_if_no_constitution: bool,
pub heartbeat_stale_secs: u64,
pub timeout_secs: Option<u64>,
pub api_key_env: Option<String>,
pub agent_profile: Option<String>,
pub enable_hooks: bool,
}Expand description
Supervisor agent configuration (v0.13.17.4).
Controls the AI-powered review that runs after the main agent exits
but before ta draft build. The supervisor checks goal alignment
and constitution compliance.
[supervisor]
enabled = true
agent = "builtin" # "builtin" | "claude-code" | "codex" | "ollama" | manifest name
verdict_on_block = "warn" # "warn" | "block"
constitution_path = ".ta/constitution.toml"
skip_if_no_constitution = true
heartbeat_stale_secs = 30 # kill if no token received for this long (replaces timeout_secs)
# timeout_secs = 120 # deprecated — use heartbeat_stale_secs instead
# api_key_env = "OPENAI_API_KEY" # optional: pre-flight check for codex / custom agentsFields§
§enabled: boolEnable the supervisor agent. Default: true when any agent is configured.
agent: StringWhich agent runs the review.
- “builtin” / “claude-code”: spawns the
claudeCLI (uses its own auth). - “codex”: spawns
codex --approval-mode full-auto --quiet. - “ollama”: invokes via
ta agent run ollama --headless. - any other string: looks up
.ta/agents/<name>.tomlmanifest.
verdict_on_block: StringBehavior when verdict is Block. “warn” = show in draft view only.
“block” = refuse ta draft approve without --override.
constitution_path: Option<PathBuf>Path to the project constitution file (relative to workspace root).
If absent, falls back to .ta/constitution.toml, then docs/TA-CONSTITUTION.md.
skip_if_no_constitution: boolDon’t fail if the constitution file is absent.
heartbeat_stale_secs: u64Kill supervisor if no token is received for this many seconds (default 30).
Replaces the wall-clock timeout_secs: a supervisor actively streaming a large diff
will never be killed — only one that stops producing output for heartbeat_stale_secs
is terminated. Set higher (e.g. 60) if your supervisor uses a slow model.
timeout_secs: Option<u64>Deprecated: wall-clock timeout in seconds. Accepted for backward compatibility.
When present, emits a deprecation warning and the value is ignored in favour of
heartbeat_stale_secs. Will be removed in a future version.
api_key_env: Option<String>Optional env var name to pre-flight check before spawning the supervisor agent.
When set, TA verifies the var is present and prints an actionable message if missing.
The agent binary handles the credential itself — TA never reads or forwards the value.
Example: api_key_env = "OPENAI_API_KEY" for the codex agent.
agent_profile: Option<String>Optional agent profile name from [agent_profiles]. When set, resolves the
framework and model for the supervisor from the profile table, overriding
the bare agent string. Any registered framework works — not just claude.
enable_hooks: boolAllow session hooks to fire in the supervisor subprocess. Default: false.
By default, TA sets CLAUDE_CODE_DISABLE_HOOKS=1 when spawning the supervisor
so that SessionStart and other hooks do not write JSON to stdout (which could
be mistaken for supervisor content and trigger false stall timeouts). Set to
true only if a custom hook must run during supervisor invocations.
Trait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Source§fn clone(&self) -> SupervisorConfig
fn clone(&self) -> SupervisorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more