From 802a44ad429aebf693437ff6fba5f150ac38cb7b Mon Sep 17 00:00:00 2001 From: Hashem Khalifa Date: Mon, 17 Aug 2026 21:23:57 +0200 Subject: [PATCH 1/2] fix(codex): pin managed agent models --- crates/tracedecay-agent-hosts/build.rs | 12 +++++++++++- tests/agent_suite/claude_plugin_bundle_test.rs | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/tracedecay-agent-hosts/build.rs b/crates/tracedecay-agent-hosts/build.rs index 0c81e4576f..c17b2d3799 100644 --- a/crates/tracedecay-agent-hosts/build.rs +++ b/crates/tracedecay-agent-hosts/build.rs @@ -185,12 +185,22 @@ fn main() { &mut code, "GENERATED_CODEX_AGENT_FILES", agents.iter().map(|agent| { + // Keep routine read-only specialists on Terra so they do not + // silently inherit an expensive primary Sol session. Semantic + // merge-risk review remains the one Sol-backed specialist. + let (model, model_reasoning_effort) = if agent.name == "change-risk-reviewer" { + ("gpt-5.6-sol", "high") + } else { + ("gpt-5.6-terra", "high") + }; ( format!("tracedecay-{}.toml", agent.name), format!( - "name = {}\ndescription = {}\nsandbox_mode = \"read-only\"\ndeveloper_instructions = {}\n", + "name = {}\ndescription = {}\nmodel = {}\nmodel_reasoning_effort = {}\nsandbox_mode = \"read-only\"\ndeveloper_instructions = {}\n", quoted_string(&format!("tracedecay-{}", agent.name)), quoted_string(&agent.description), + quoted_string(model), + quoted_string(model_reasoning_effort), quoted_string(&agent.body), ), ) diff --git a/tests/agent_suite/claude_plugin_bundle_test.rs b/tests/agent_suite/claude_plugin_bundle_test.rs index 5534a9df62..35ef222b3d 100644 --- a/tests/agent_suite/claude_plugin_bundle_test.rs +++ b/tests/agent_suite/claude_plugin_bundle_test.rs @@ -588,6 +588,16 @@ fn cursor_and_codex_agents_are_generated_from_the_canonical_catalog() { Some(required_scalar(&claude, "description", &claude_path).as_str()) ); assert_eq!(codex_toml["sandbox_mode"].as_str(), Some("read-only")); + let (expected_model, expected_effort) = if stem == "change-risk-reviewer" { + ("gpt-5.6-sol", "high") + } else { + ("gpt-5.6-terra", "high") + }; + assert_eq!(codex_toml["model"].as_str(), Some(expected_model)); + assert_eq!( + codex_toml["model_reasoning_effort"].as_str(), + Some(expected_effort) + ); assert_eq!( codex_toml["developer_instructions"].as_str().map(str::trim), Some(canonical_body.trim()) From b3e7efe017429836a5b46bfe439221027c809a26 Mon Sep 17 00:00:00 2001 From: Hashem Khalifa Date: Mon, 17 Aug 2026 21:36:07 +0200 Subject: [PATCH 2/2] fix(codex): keep managed reviewers on Terra --- crates/tracedecay-agent-hosts/build.rs | 12 ++++-------- tests/agent_suite/claude_plugin_bundle_test.rs | 12 ++---------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/crates/tracedecay-agent-hosts/build.rs b/crates/tracedecay-agent-hosts/build.rs index c17b2d3799..864bb705c5 100644 --- a/crates/tracedecay-agent-hosts/build.rs +++ b/crates/tracedecay-agent-hosts/build.rs @@ -185,14 +185,10 @@ fn main() { &mut code, "GENERATED_CODEX_AGENT_FILES", agents.iter().map(|agent| { - // Keep routine read-only specialists on Terra so they do not - // silently inherit an expensive primary Sol session. Semantic - // merge-risk review remains the one Sol-backed specialist. - let (model, model_reasoning_effort) = if agent.name == "change-risk-reviewer" { - ("gpt-5.6-sol", "high") - } else { - ("gpt-5.6-terra", "high") - }; + // Keep read-only specialists on Terra so they do not silently + // inherit an expensive primary Sol session. Sol Advisor owns the + // separately configured explicit final/high-risk review lane. + let (model, model_reasoning_effort) = ("gpt-5.6-terra", "high"); ( format!("tracedecay-{}.toml", agent.name), format!( diff --git a/tests/agent_suite/claude_plugin_bundle_test.rs b/tests/agent_suite/claude_plugin_bundle_test.rs index 35ef222b3d..3fadb07e6c 100644 --- a/tests/agent_suite/claude_plugin_bundle_test.rs +++ b/tests/agent_suite/claude_plugin_bundle_test.rs @@ -588,16 +588,8 @@ fn cursor_and_codex_agents_are_generated_from_the_canonical_catalog() { Some(required_scalar(&claude, "description", &claude_path).as_str()) ); assert_eq!(codex_toml["sandbox_mode"].as_str(), Some("read-only")); - let (expected_model, expected_effort) = if stem == "change-risk-reviewer" { - ("gpt-5.6-sol", "high") - } else { - ("gpt-5.6-terra", "high") - }; - assert_eq!(codex_toml["model"].as_str(), Some(expected_model)); - assert_eq!( - codex_toml["model_reasoning_effort"].as_str(), - Some(expected_effort) - ); + assert_eq!(codex_toml["model"].as_str(), Some("gpt-5.6-terra")); + assert_eq!(codex_toml["model_reasoning_effort"].as_str(), Some("high")); assert_eq!( codex_toml["developer_instructions"].as_str().map(str::trim), Some(canonical_body.trim())