diff options
| author | main <main@swarm.moe> | 2026-03-23 16:10:39 -0400 |
|---|---|---|
| committer | main <main@swarm.moe> | 2026-03-23 16:10:39 -0400 |
| commit | 1422dfed798ff1356a63449a803a8bbdfab79ec8 (patch) | |
| tree | a10f99d53acf48752bf3e49e9324ab1a2fbbb993 | |
| parent | ff76c72f3c78694eebe4824318e85c4751343cf4 (diff) | |
| download | phone_opus-1422dfed798ff1356a63449a803a8bbdfab79ec8.zip | |
Pin phone-opus to Opus max effort
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | assets/codex-skills/phone-opus/SKILL.md | 1 | ||||
| -rw-r--r-- | crates/phone-opus/src/mcp/protocol.rs | 2 | ||||
| -rw-r--r-- | crates/phone-opus/src/mcp/service.rs | 8 | ||||
| -rw-r--r-- | crates/phone-opus/tests/mcp_hardening.rs | 6 |
5 files changed, 17 insertions, 3 deletions
@@ -21,7 +21,8 @@ telemetry surfaces: Each `consult` call runs Claude Code with: - the system `claude` binary -- the normal settings stack, including user-level defaults +- `--model claude-opus-4-6` +- `--effort max` - no configured MCP servers (`--strict-mcp-config --mcp-config '{"mcpServers":{}}'`) - a read-only built-in toolset: - `Bash,Read,Grep,Glob,LS,WebFetch,WebSearch` diff --git a/assets/codex-skills/phone-opus/SKILL.md b/assets/codex-skills/phone-opus/SKILL.md index 5fe91d7..9ea2674 100644 --- a/assets/codex-skills/phone-opus/SKILL.md +++ b/assets/codex-skills/phone-opus/SKILL.md @@ -28,6 +28,7 @@ should be taken as authoritative or final. It is a pure consultant. ## Runtime posture +- Pins Claude to Opus 4.6 with max effort. - Uses `--permission-mode dontAsk`, so only globally preapproved read-only Bash commands can execute. - This surface is consultative only. Edit tools are unavailable. - The returned `session_id` is reusable: pass it back into a later `consult` call to continue that Claude conversation. diff --git a/crates/phone-opus/src/mcp/protocol.rs b/crates/phone-opus/src/mcp/protocol.rs index 6662fa9..5cd8313 100644 --- a/crates/phone-opus/src/mcp/protocol.rs +++ b/crates/phone-opus/src/mcp/protocol.rs @@ -12,6 +12,8 @@ pub(crate) const HOST_STATE_ENV: &str = "PHONE_OPUS_MCP_HOST_STATE"; pub(crate) const FORCE_ROLLOUT_ENV: &str = "PHONE_OPUS_MCP_TEST_FORCE_ROLLOUT_KEY"; pub(crate) const WORKER_CRASH_ONCE_ENV: &str = "PHONE_OPUS_MCP_TEST_WORKER_CRASH_ONCE_KEY"; pub(crate) const CLAUDE_BIN_ENV: &str = "PHONE_OPUS_CLAUDE_BIN"; +pub(crate) const CLAUDE_EFFORT: &str = "max"; +pub(crate) const CLAUDE_MODEL: &str = "claude-opus-4-6"; pub(crate) const CLAUDE_TOOLSET: &str = "Bash,Read,Grep,Glob,LS,WebFetch,WebSearch"; pub(crate) const EMPTY_MCP_CONFIG: &str = "{\"mcpServers\":{}}"; diff --git a/crates/phone-opus/src/mcp/service.rs b/crates/phone-opus/src/mcp/service.rs index c57d0db..378ce43 100644 --- a/crates/phone-opus/src/mcp/service.rs +++ b/crates/phone-opus/src/mcp/service.rs @@ -13,7 +13,9 @@ use crate::mcp::fault::{FaultRecord, FaultStage}; use crate::mcp::output::{ ToolOutput, fallback_detailed_tool_output, split_presentation, tool_success, }; -use crate::mcp::protocol::{CLAUDE_BIN_ENV, CLAUDE_TOOLSET, EMPTY_MCP_CONFIG}; +use crate::mcp::protocol::{ + CLAUDE_BIN_ENV, CLAUDE_EFFORT, CLAUDE_MODEL, CLAUDE_TOOLSET, EMPTY_MCP_CONFIG, +}; pub(crate) fn run_worker(generation: u64) -> Result<(), Box<dyn std::error::Error>> { let generation = generation_from_wire(generation); @@ -346,6 +348,10 @@ fn invoke_claude(request: &ConsultRequest) -> Result<ConsultResponse, ConsultInv .arg(EMPTY_MCP_CONFIG) .arg("--disable-slash-commands") .arg("--no-chrome") + .arg("--model") + .arg(CLAUDE_MODEL) + .arg("--effort") + .arg(CLAUDE_EFFORT) .arg("--tools") .arg(CLAUDE_TOOLSET) .arg("--permission-mode") diff --git a/crates/phone-opus/tests/mcp_hardening.rs b/crates/phone-opus/tests/mcp_hardening.rs index bc338ca..918c3c4 100644 --- a/crates/phone-opus/tests/mcp_hardening.rs +++ b/crates/phone-opus/tests/mcp_hardening.rs @@ -257,7 +257,7 @@ fn consult_can_resume_a_prior_session_with_read_only_toolset_and_requested_worki "output_tokens": 5 }, "modelUsage": { - "claude-sonnet-4-6": { + "claude-opus-4-6": { "inputTokens": 10, "outputTokens": 5 } @@ -327,6 +327,10 @@ fn consult_can_resume_a_prior_session_with_read_only_toolset_and_requested_worki assert!(lines.contains(&"{\"mcpServers\":{}}")); assert!(lines.contains(&"--disable-slash-commands")); assert!(lines.contains(&"--no-chrome")); + assert!(lines.contains(&"--model")); + assert!(lines.contains(&"claude-opus-4-6")); + assert!(lines.contains(&"--effort")); + assert!(lines.contains(&"max")); assert!(lines.contains(&"--tools")); assert!(lines.contains(&"Bash,Read,Grep,Glob,LS,WebFetch,WebSearch")); assert!(lines.contains(&"--permission-mode")); |