Run the Assistant at low effort on its connection's model
The Assistant answers a person who is waiting. Its launch now asks for the lowest effort: Claude gets --effort low, and every Codex turn/start carries effort "low" through the assist TurnPolicy (the pinned app-server 0.165.0 sends it as the request's reasoning.effort, checked against a local fake Responses endpoint; without it the request carried no effort and the model's default applied). The model is unchanged. Claude and Codex subscription connections bind exactly one model and have no allowed set (S5b's sets and tier tables cover only metered connections), so a faster model for the Assistant would need a person's setting. Coordinator, job thread and specialist launches keep their defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+90
−0
internal/runner/provider/claude/assist_policy_test.go+33 −0internal/runner/provider/claude/launcher.go+10 −0internal/runner/provider/codex/assist_policy_test.go+36 −0internal/runner/provider/codex/launcher.go+11 −0
Intent
diff --git a/internal/runner/provider/claude/assist_policy_test.go b/internal/runner/provider/claude/assist_policy_test.go| index 204420cb..f9c3aaf8 100644 |
| --- a/internal/runner/provider/claude/assist_policy_test.go |
| +++ b/internal/runner/provider/claude/assist_policy_test.go |
| @@ -39,3 +39,36 @@ func TestAssistLaunchPinsSixTools(t *testing.T) { |
| t.Fatalf("converse with use: %v", err) |
| } |
| } |
| + |
| +// The Assistant answers a person who is waiting: its launch asks for the |
| +// lowest effort on the connection's own model, and the team's launches |
| +// keep the CLI's default. |
| +func TestAssistLaunchLowEffort(t *testing.T) { |
| + b := provider.Binding{Provider: "claude", CredentialHome: "/private/account", Home: "/private/run", RuntimeRoot: "/private/runtime"} |
| + effort := func(action string) (string, []string) { |
| + t.Helper() |
| + profile, err := provider.Profile(action) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + got, err := PolicyInputs(b, provider.PolicyInputs{Action: action, Tools: profile.MCPTools()}, profile.Specialist, "claude-opus-5-5") |
| + if err != nil { |
| + t.Fatalf("%s: %v", action, err) |
| + } |
| + if i := slices.Index(got.Argv, "--model"); i < 0 || got.Argv[i+1] != "claude-opus-5-5" { |
| + t.Fatalf("%s model %v", action, got.Argv) |
| + } |
| + if i := slices.Index(got.Argv, "--effort"); i >= 0 && i+1 < len(got.Argv) { |
| + return got.Argv[i+1], got.Argv |
| + } |
| + return "", got.Argv |
| + } |
| + if got, argv := effort("assist"); got != "low" { |
| + t.Fatalf("assist effort %q: %v", got, argv) |
| + } |
| + for _, action := range []string{"converse", "coordinate", "implement", "inspect", "answer"} { |
| + if got, argv := effort(action); got != "" { |
| + t.Fatalf("%s effort %q: %v", action, got, argv) |
| + } |
| + } |
| +} |
diff --git a/internal/runner/provider/claude/launcher.go b/internal/runner/provider/claude/launcher.go| index a1c659f9..041198c9 100644 |
| --- a/internal/runner/provider/claude/launcher.go |
| +++ b/internal/runner/provider/claude/launcher.go |
| @@ -100,6 +100,10 @@ func AuthStatusArgs() []string { |
| return []string{"/opt/claude", "--setting-sources", "", "--settings", provider.SettingsPath, "--strict-mcp-config", "--mcp-config", provider.MCPPath, "--disable-slash-commands", "auth", "status", "--json"} |
| } |
| +// AssistEffort is the Assistant's effort level (the pinned CLI's |
| +// --effort: low, medium, high, xhigh). |
| +const AssistEffort = "low" |
| + |
| func baseArgs(model, tools string) []string { |
| return []string{"/opt/claude", "-p", "--verbose", "--include-hook-events", "--input-format", "stream-json", "--output-format", "stream-json", "--model", model, "--setting-sources", "", "--disable-slash-commands", "--strict-mcp-config", "--mcp-config", provider.MCPPath, "--settings", provider.SettingsPath, "--permission-mode", "manual", "--permission-prompt-tool", "mcp__equipo__permission", "--tools", tools} |
| } |
| @@ -205,6 +209,12 @@ func PolicyInputs(b provider.Binding, in provider.PolicyInputs, specialist, mode |
| if provider.CoordinatorAction(in.Action) || specialist == "Coordinator" || in.Action == "answer" { |
| in.Argv = append(in.Argv, "--include-partial-messages") |
| } |
| + // The Assistant answers a person who is waiting: the lowest effort |
| + // on the connection's own model. Its model is the person's choice and |
| + // stays as bound; the team's launches keep the CLI's default effort. |
| + if in.Action == "assist" { |
| + in.Argv = append(in.Argv, "--effort", AssistEffort) |
| + } |
| return in, nil |
| } |
| func compact(v []string) []string { |
diff --git a/internal/runner/provider/codex/assist_policy_test.go b/internal/runner/provider/codex/assist_policy_test.go| index ad3ef968..951e4fb2 100644 |
| --- a/internal/runner/provider/codex/assist_policy_test.go |
| +++ b/internal/runner/provider/codex/assist_policy_test.go |
| @@ -1,6 +1,7 @@ |
| package codex |
| import ( |
| + "encoding/json" |
| "errors" |
| "testing" |
| @@ -23,3 +24,38 @@ func TestAssistLaunchCodex(t *testing.T) { |
| t.Fatalf("a seventh tool: %v", err) |
| } |
| } |
| + |
| +// The Assistant answers a person who is waiting: each of its turns asks |
| +// for low reasoning effort on the connection's own model, and the team's |
| +// turns keep the model's default. |
| +func TestAssistLaunchCodexLowEffort(t *testing.T) { |
| + b := provider.Binding{Provider: "codex", CredentialHome: "/private/account", Home: "/private/run", RuntimeRoot: "/private/runtime"} |
| + turn := func(action string) map[string]any { |
| + t.Helper() |
| + profile, err := provider.Profile(action) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + in, err := PolicyInputs(b, provider.PolicyInputs{Action: action, Tools: profile.MCPTools(), DeniedPaths: []string{"/private/state"}}, "gpt-6-astra") |
| + if err != nil { |
| + t.Fatalf("%s: %v", action, err) |
| + } |
| + var thread struct{ Model string } |
| + if json.Unmarshal(in.ThreadPolicy, &thread) != nil || thread.Model != "gpt-6-astra" { |
| + t.Fatalf("%s thread %s", action, in.ThreadPolicy) |
| + } |
| + var params map[string]any |
| + if err := json.Unmarshal(TurnParams(provider.Policy{TurnPolicy: in.TurnPolicy}, "th", "hello"), ¶ms); err != nil { |
| + t.Fatal(err) |
| + } |
| + return params |
| + } |
| + if got := turn("assist"); got["effort"] != "low" || got["threadId"] != "th" { |
| + t.Fatalf("assist turn/start %v", got) |
| + } |
| + for _, action := range []string{"converse", "coordinate", "implement", "inspect"} { |
| + if got, ok := turn(action)["effort"]; ok { |
| + t.Fatalf("%s effort %v", action, got) |
| + } |
| + } |
| +} |
diff --git a/internal/runner/provider/codex/launcher.go b/internal/runner/provider/codex/launcher.go| index 3e322282..0d5d094e 100644 |
| --- a/internal/runner/provider/codex/launcher.go |
| +++ b/internal/runner/provider/codex/launcher.go |
| @@ -23,6 +23,9 @@ import ( |
| const Version = provider.CodexVersion |
| const ExecutableSHA256 = "c06a67fd8ac76508dc78bd99ce20c9f317b8d568beda59485f3f4134df9962d5" |
| const CodeModeHostSHA256 = "522935d4392ec9674fab60b239b5495992c6a93e4deb65113a216b6f5451ccd4" |
| + |
| +// AssistEffort is the Assistant's reasoning effort (turn/start effort). |
| +const AssistEffort = "low" |
| const errNotReady provider.Error = "codex_not_ready" |
| const errUncertain provider.Error = "codex_turn_uncertain" |
| const errFailed provider.Error = "codex_process_failed" |
| @@ -187,6 +190,14 @@ func PolicyInputs(b provider.Binding, in provider.PolicyInputs, model string) (p |
| thread["experimentalRawEvents"] = true |
| in.ThreadPolicy = marshal(thread) |
| in.TurnPolicy = json.RawMessage(`{}`) |
| + if in.Action == "assist" { |
| + // The Assistant answers a person who is waiting: low reasoning |
| + // effort on every turn/start, on the connection's own model (the |
| + // person's choice, unchanged). The pinned app-server sends it as |
| + // the request's reasoning.effort; the team's turns keep the |
| + // model's default. |
| + in.TurnPolicy = marshal(map[string]string{"effort": AssistEffort}) |
| + } |
| in.Argv = []string{"/opt/codex", "app-server", "--strict-config", "--listen", "stdio://"} |
| keys := make([]string, 0, len(settings)) |
| for k := range settings { |