oficina / equipo Public

Remove specialist question tool and verify Codex routing

Co-Authored-By: Astra <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 49cdfb525f930f4bdb6ee01284d28e5b331f67a7 parent d06f9cb
13 files changed, +194 −25
  • docs/superpowers/plans/CONTROLLER-REPORT-final-gaps.md +126 −0
  • internal/directlive/codex_inventory.go +1 −1
  • internal/directlive/final_gaps_test.go +1 −1
  • internal/directlive/routing_setup.go +0 −3
  • internal/directlive/try_inventory_test.go +1 −1
  • internal/release/manifest.json +8 −8
  • internal/runner/mcpresource/resource.go +2 −1
  • internal/runner/mcpresource/resource_test.go +2 −1
  • internal/runner/provider/codex/catalog_guards_test.go +7 −2
  • internal/runner/provider/codex/config_readback.go +10 −6
  • internal/runner/provider/codex/live_config_test.go +30 −0
  • internal/runner/provider/codex/probe_failures_test.go +4 −1
  • internal/runner/provider/codex/specialist_catalog.go +2 −0

CI passed — run details

diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-final-gaps.md b/docs/superpowers/plans/CONTROLLER-REPORT-final-gaps.md
index 0d85cad0..cec1c2c0 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-final-gaps.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-final-gaps.md
@@ -1,5 +1,8 @@
# Final gaps, 2026-11-05
+Round 2 below resolves H1. The earlier question and limitations in this report
+record round 1 and are superseded by the round 2 results.
+
H2, H3 and H4 are implemented. H1 remains incomplete: the captured Codex
0.165.0 catalog describes `request_user_input` as available only in Plan mode.
The normal specialist routing turn does not use Plan mode, and the model
@@ -176,3 +179,126 @@ deployment was performed. Temporary harnesses, overlays, debugging captures,
binaries and logs were removed after their results were recorded here. Both
provider launches closed normally; their namespace records and staged homes
were retired. No task process or server remains.
+
+## Round 2
+
+H1 is complete. Both focused Codex Engineering launches passed every exposed
+workspace routing row. The native `request_user_input` tool was absent from
+both captured catalogs. Specialists retain `mcp__equipo__ask_person` for questions.
+
+The pinned 0.165.0 honors `tools.experimental_request_user_input.enabled=false`.
+Specialist construction now sets that flag and explicitly keeps
+`features.default_mode_request_user_input=false`. These settings are included
+in the existing policy manifest and hash. The live specialist inventory rejects
+`request_user_input` in any captured catalog frame. The obsolete routing prompt
+for that native question tool was removed. The coordinator policy is unchanged.
+
+Typed effective config omits the disabled tool flag, as it already did for the
+coordinator. Specialist readback now accepts that exact pinned omission only
+when the tool map is `{"web_search":null}` and the requested flag is false.
+The command-line layer must retain the requested settings. Enabled, missing or
+changed settings are rejected, and catalog absence is checked independently.
+Eight Codex specialist inventory hashes changed; the coordinator hash did not.
+All 18 release inventory entries remain uncertified.
+
+### Resource read diagnosis
+
+The first launch captured these incoming `resources/read` parameters:
+
+```json
+{"_meta":{"progressToken":6},"uri":"equipo://routing-check"}
+```
+
+The previous round had already added `_meta` support after live-2, without a
+fresh live check. The new capture confirms that Codex sends this field. Removing
+that support reproduces `runner.invalid` with the captured parameters. The
+existing fix is retained, documented and covered by the exact captured input;
+no broader resource handler change was needed. Unknown fields and other URIs
+remain refused. The second launch used the uninstrumented handler and returned
+the fixed resource successfully.
+
+### Launch log
+
+Only binding `codex`, account `paul@tito.io`, home `account-2598223264`, model
+`gpt-6-astra`, provider 0.165.0 was launched. No Claude launch or other account
+was used. Credential contents were not inspected. Credential staging used the
+production account lease. No sign-in or edit to state.json, bindings.json or
+runner.env occurred.
+
+The temporary source overlay kept production exercise setup, policy
+construction, account leasing, containment, journal, broker, terminal reader,
+launch and shutdown. It restricted execution to catalog discovery and workspace
+routing for Codex Engineering. It skipped outside probes, recovery, the full
+live gate and certificate/bundle writers. The input validator retained its
+ordinary two-binding configuration, but only the authorized Codex binding was
+opened. Every launch used a fresh disposable Git repository and private scratch.
+
+Live-1 temporarily attached the fixed resource's incoming parameters as response
+metadata for diagnosis, without changing its contents or acceptance decision.
+Live-2 removed that instrumentation from both executables. Captures were debugging
+observations only, not certification evidence. Times below are UTC, 2026-11-05.
+
+| Start | End | Tuple | Turns | Result |
+| --- | --- | --- | ---: | --- |
+| 15:22:38 | 15:23:45 | codex-Engineering, live-1 | 2 | All ten workspace rows pass; native question tool absent; resource parameters captured. |
+| 15:25:40 | 15:26:48 | codex-Engineering, live-2 | 2 | All ten workspace rows pass with uninstrumented resource handler; native question tool absent. |
+
+Four model turns were used, within the ten-turn budget. Both launches passed
+observed effective policy, strict MCP and disabled hooks/plugins readback.
+The ten passing rows in each run were `apply_patch`, `exec_command`,
+`list_mcp_resource_templates`, `list_mcp_resources`, `mcp__equipo__ask_person`,
+`mcp__equipo__submit_candidate`, `mcp__equipo__submit_render`, `read_mcp_resource`,
+`view_image` and `write_stdin`. Stdin proof included the waiting process,
+matching session ID, input marker and successful exit.
+
+### Verification
+
+The first targeted command failed before implementation:
+
+```sh
+CGO_ENABLED=0 go test ./internal/directlive ./internal/runner/provider/codex -run 'TestSpecialist(NoGoalOrPluginTools|ObservableToolCatalog)$' -count=1
+```
+
+It caught the accepted native question tool and both missing disabled settings.
+The release inventory test then failed for exactly the eight changed specialist
+hashes before the manifest was updated. Coordinator inventory remained valid.
+
+The restored combined targeted command passed all four packages:
+
+```sh
+CGO_ENABLED=0 go test ./internal/directlive ./internal/runner/provider/codex ./internal/runner/mcpresource ./internal/release -run 'TestSpecialist|TestCodexLiveConfig|TestRouting(ResourceOnly|SetupCompletable)|TestCodexRoutingResourceResults|TestCodexWriteStdinRoutingPrecondition|TestPlanWorkflowReleasePolicyInventory|TestCoordinator' -count=1
+```
+
+Seven temporary mutation overlays each produced a failing assertion, then were
+removed from use. Each ran with
+`CGO_ENABLED=0 go test -overlay <overlay.json> <package> -run '^<test>$' -count=1`:
+
+| Broken behavior | Failing test |
+| --- | --- |
+| Accept native question tool in inventory | TestSpecialistNoGoalOrPluginTools |
+| Enable specialist native question tool | TestSpecialistObservableToolCatalog |
+| Enable default-mode questions | TestSpecialistObservableToolCatalog |
+| Reject captured resource metadata | TestRoutingResourceOnly |
+| Restore coordinator-only readback exception | TestSpecialistQuestionReadback |
+| Accept enabled effective tool config | TestSpecialistQuestionReadback |
+| Skip constructor settings comparison | TestSpecialistCatalogAuthority/question |
+
+The single full `make -k ci` invocation exited 0; no rerun was needed.
+All 29 test packages passed uncached in 5m21.516s. Build, vet, formatting,
+static analysis, vulnerability and secret scans, reference checks, size budgets,
+provider and namespace checks, migration and performance passed. Cold boot was
+117ms against 500ms, and every screen met its 150ms budget.
+
+Local timing warnings remained: provider 20.577s against 15s, Claude 45.969s
+against 45s, and Codex 38.495s against 35s. These are reported locally and
+would fail with CI timing enforcement; no passing remote gate is claimed.
+
+### Delivery
+
+The delivery branch remains `final-gaps`. No README prose or app-owned runtime
+copy changed. No copy-review server was started. No merge, default-branch push,
+deployment, full live gate or certification bundle was performed.
+
+Both live sessions closed normally. Their namespace records and staged homes
+were retired. All task-created harnesses, overlays, captures, binaries and logs
+were removed after recording the results here. No task process or server remains.
diff --git a/internal/directlive/codex_inventory.go b/internal/directlive/codex_inventory.go
index 4cfb57c4..e901742e 100644
--- a/internal/directlive/codex_inventory.go
+++ b/internal/directlive/codex_inventory.go
@@ -36,7 +36,7 @@ func codexInventory(session string, frames []json.RawMessage) ([]string, error)
}
for _, name := range got {
// Disabled features must also be absent from the live tool catalog.
- if strings.Contains(name, "goal") || strings.Contains(name, "plugin") || name == "suggest_tools" {
+ if strings.Contains(name, "goal") || strings.Contains(name, "plugin") || name == "suggest_tools" || name == "request_user_input" {
return nil, provider.ErrPolicy
}
}
diff --git a/internal/directlive/final_gaps_test.go b/internal/directlive/final_gaps_test.go
index b5675be2..a3b5290d 100644
--- a/internal/directlive/final_gaps_test.go
+++ b/internal/directlive/final_gaps_test.go
@@ -9,7 +9,7 @@ import (
func TestRoutingSetupCompletable(t *testing.T) {
x := exercise{}
- for tool, need := range map[string]string{"request_user_input": "routing", "read_mcp_resource": "equipo://routing-check", "write_stdin": routingStdinCommand} {
+ for tool, need := range map[string]string{"read_mcp_resource": "equipo://routing-check", "write_stdin": routingStdinCommand} {
prompt, err := x.routingSetup(context.Background(), tool, "/workspace/control")
if err != nil || !strings.Contains(prompt, need) {
t.Errorf("%s setup incomplete: %s %v", tool, prompt, err)
diff --git a/internal/directlive/routing_setup.go b/internal/directlive/routing_setup.go
index c7d87295..7f6271fa 100644
--- a/internal/directlive/routing_setup.go
+++ b/internal/directlive/routing_setup.go
@@ -45,9 +45,6 @@ func (x *exercise) routingSetup(ctx context.Context, tool, path string) (string,
return "Call read_mcp_resource with server=equipo and uri=equipo://routing-check. It is a fixed, read-only routing fixture.\n", nil
case "list_mcp_resources", "list_mcp_resource_templates":
return "Call this tool with server=equipo.\n", nil
- case "request_user_input":
- return `Call request_user_input exactly once with {"questions":[{"id":"routing","header":"routing","question":"Continue this disposable routing check?","options":[{"label":"Continue","description":"Finish the check."},{"label":"Stop","description":"Stop the check."}]}]}. The routing harness answers Continue automatically; wait for its answer before finishing.
-`, nil
default:
return "Use valid arguments for a harmless workspace control. A missing prerequisite fails certification; never invent evidence.\n", nil
}
diff --git a/internal/directlive/try_inventory_test.go b/internal/directlive/try_inventory_test.go
index 54908084..78b0e441 100644
--- a/internal/directlive/try_inventory_test.go
+++ b/internal/directlive/try_inventory_test.go
@@ -21,7 +21,7 @@ func TestSpecialistObservedCatalog(t *testing.T) {
}
func TestSpecialistNoGoalOrPluginTools(t *testing.T) {
- for _, tool := range []string{"create_goal", "get_goal", "update_goal", "request_plugin_install", "list_plugins", "suggest_tools"} {
+ for _, tool := range []string{"request_user_input", "create_goal", "get_goal", "update_goal", "request_plugin_install", "list_plugins", "suggest_tools"} {
t.Run(tool, func(t *testing.T) {
raw := json.RawMessage(strings.ReplaceAll(`{"method":"rawResponseItem/completed","params":{"threadId":"session","item":{"type":"additional_tools","role":"developer","tools":[{"type":"namespace","name":"functions","tools":[{"type":"function","name":"TOOL"}]}]}}}`, "TOOL", tool))
if _, err := codexInventory("session", []json.RawMessage{raw}); err == nil {
diff --git a/internal/release/manifest.json b/internal/release/manifest.json
index 20bd020d..9b5b2158 100644
--- a/internal/release/manifest.json
+++ b/internal/release/manifest.json
@@ -66,49 +66,49 @@
{
"provider": "codex",
"action": "reproduce",
- "inventory_hash": "54dca9e7dd4586a83bc07ec90d851515dbc1282e4d60cbfb763748082b17b620",
+ "inventory_hash": "901526200f84751107212e20d37ba0fb69b7327c68f22fb848bce0b1e8d8015a",
"status": "uncertified"
},
{
"provider": "codex",
"action": "scope",
- "inventory_hash": "c974736608caf867121637a6a5c8f09f9cdcb411816f7d6f833382768331252c",
+ "inventory_hash": "d4ca8ac8de09708ff436f6e6f9f37c7633f0f142ed8f05dc0323fd125067d7cb",
"status": "uncertified"
},
{
"provider": "codex",
"action": "recommend",
- "inventory_hash": "9fcf66944fb316b3c03d11ca4d22e389eafeb9fa35c9b4b2a5a7d37c3682248f",
+ "inventory_hash": "1b74ea49e9ea967cc5e45259f5083a1e72a075f0c4a36966bf7b547cd35b63b4",
"status": "uncertified"
},
{
"provider": "codex",
"action": "investigate",
- "inventory_hash": "156120ec1e363ca4c3078ea586cb9f3e2b2391304bc9d65cbe064269299b847d",
+ "inventory_hash": "41d48df7ddc595e8bf8d18af7aec7949d061e3f623be652acb641701bbe14c7d",
"status": "uncertified"
},
{
"provider": "codex",
"action": "implement",
- "inventory_hash": "768493e64fbbd8f83ec8a55dd254e67ff2a72dcb1420b4358ebe851949515bae",
+ "inventory_hash": "c17dcf2652a12d934d315a9851ef30c2a44e28c0b335821fd37130d80073ce5d",
"status": "uncertified"
},
{
"provider": "codex",
"action": "copy",
- "inventory_hash": "1bb921376a123ea8045ef598409add46f48a92365c8446cd68509e7cefb41401",
+ "inventory_hash": "07d46054cadebbb157b506214dc68dd28f603c7b7626a24d2f7a68fd9dab58cd",
"status": "uncertified"
},
{
"provider": "codex",
"action": "design",
- "inventory_hash": "a7c1b68fc9eddf355d840a94888d79815faa09b5be33116d4db8baab02b6dd12",
+ "inventory_hash": "f9c15cf275406039ca47da0b22b7d3fdaaabde84d320690a965c0cb53bbf5623",
"status": "uncertified"
},
{
"provider": "codex",
"action": "review",
- "inventory_hash": "3ea818300ad288807e7c9f5f1921e7cd7de12a6ae9e70e0135a3bdf39b1825c5",
+ "inventory_hash": "93d34cac547f6daef7ef6d6d0a4220df25fbb98bf03e15e5e743f694bc2a35a7",
"status": "uncertified"
},
{
diff --git a/internal/runner/mcpresource/resource.go b/internal/runner/mcpresource/resource.go
index 84a75afc..2abf22c3 100644
--- a/internal/runner/mcpresource/resource.go
+++ b/internal/runner/mcpresource/resource.go
@@ -17,7 +17,8 @@ func Result(method string, raw json.RawMessage) (any, error) {
return map[string]any{"resourceTemplates": []any{}}, nil
case "resources/read":
var params struct {
- URI string `json:"uri"`
+ URI string `json:"uri"`
+ // Codex 0.165.0 sends a progress token on resource reads.
Meta json.RawMessage `json:"_meta,omitempty"`
}
if runnerproto.DecodeLimit(bytes.NewReader(raw), &params, 64<<10) != nil || params.URI != uri {
diff --git a/internal/runner/mcpresource/resource_test.go b/internal/runner/mcpresource/resource_test.go
index 09b4b875..c03f9372 100644
--- a/internal/runner/mcpresource/resource_test.go
+++ b/internal/runner/mcpresource/resource_test.go
@@ -12,7 +12,8 @@ func TestRoutingResourceOnly(t *testing.T) {
{"resources/list", `{}`, `{"resources":[{"mimeType":"text/plain","name":"routing-check","uri":"equipo://routing-check"}]}`},
{"resources/templates/list", `{}`, `{"resourceTemplates":[]}`},
{"resources/read", `{"uri":"equipo://routing-check"}`, `{"contents":[{"mimeType":"text/plain","text":"equipo-routing-ready","uri":"equipo://routing-check"}]}`},
- {"resources/read", `{"uri":"equipo://routing-check","_meta":{"progressToken":1}}`, `{"contents":[{"mimeType":"text/plain","text":"equipo-routing-ready","uri":"equipo://routing-check"}]}`},
+ // Captured from Codex 0.165.0 during round 2, live-1.
+ {"resources/read", `{"_meta":{"progressToken":6},"uri":"equipo://routing-check"}`, `{"contents":[{"mimeType":"text/plain","text":"equipo-routing-ready","uri":"equipo://routing-check"}]}`},
{"resources/read", `{"uri":"file:///workspace/private"}`, ""},
{"resources/read", `{"uri":"equipo://routing-check/other"}`, ""},
{"resources/read", `{"uri":"equipo://routing-check","path":"/home/runner"}`, ""},
diff --git a/internal/runner/provider/codex/catalog_guards_test.go b/internal/runner/provider/codex/catalog_guards_test.go
index 21e195c4..28641c55 100644
--- a/internal/runner/provider/codex/catalog_guards_test.go
+++ b/internal/runner/provider/codex/catalog_guards_test.go
@@ -8,7 +8,7 @@ import (
)
func TestSpecialistCatalogAuthority(t *testing.T) {
- for _, mutation := range []string{"bytes", "code_mode", "collaboration", "template"} {
+ for _, mutation := range []string{"bytes", "code_mode", "collaboration", "template", "question"} {
t.Run(mutation, func(t *testing.T) {
f := fixtureFor(t)
in := f.inputs
@@ -19,7 +19,12 @@ func TestSpecialistCatalogAuthority(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if mutation != "bytes" {
+ if mutation == "question" {
+ var settings map[string]any
+ _ = json.Unmarshal(in.Settings, &settings)
+ settings["tools"].(map[string]any)["experimental_request_user_input"] = map[string]any{"enabled": true}
+ in.Settings = marshal(settings)
+ } else if mutation != "bytes" {
var catalog struct{ Models []map[string]any }
if json.Unmarshal(in.Catalog, &catalog) != nil {
t.Fatal("catalog")
diff --git a/internal/runner/provider/codex/config_readback.go b/internal/runner/provider/codex/config_readback.go
index 00574c73..c7259628 100644
--- a/internal/runner/provider/codex/config_readback.go
+++ b/internal/runner/provider/codex/config_readback.go
@@ -11,25 +11,29 @@ func effectiveConfigMatches(p provider.Policy, got map[string]json.RawMessage) b
return true
}
var m struct{ ProviderVersion string }
- if !p.Coordinator() || json.Unmarshal(p.Manifest, &m) != nil || m.ProviderVersion != Version {
+ if json.Unmarshal(p.Manifest, &m) != nil || m.ProviderVersion != Version {
return false
}
var want map[string]json.RawMessage
if json.Unmarshal(p.Settings, &want) != nil {
return false
}
- // 0.165.0 keeps these two disabled flags in the session layer but omits
+ // 0.165.0 keeps disabled tool flags in the session layer but omits
// them from typed effective config; this is not proof they are disabled.
- // The live tool inventory check in directlive/coordinator_inventory.go is
- // the real guard. The unmodified command-line layer is checked below.
+ // Live inventories must also prove absence. validateConfig separately
+ // requires an unchanged command-line layer.
var tools, effective map[string]json.RawMessage
- if json.Unmarshal(want["tools"], &tools) != nil || len(tools) != 2 || json.Unmarshal(got["tools"], &effective) != nil {
+ keys := []string{"experimental_request_user_input"}
+ if p.Coordinator() {
+ keys = append(keys, "update_plan")
+ }
+ if json.Unmarshal(want["tools"], &tools) != nil || len(tools) != len(keys) || json.Unmarshal(got["tools"], &effective) != nil {
return false
}
if len(effective) != 1 || !sameJSON(effective["web_search"], []byte(`null`)) {
return false
}
- for _, key := range []string{"update_plan", "experimental_request_user_input"} {
+ for _, key := range keys {
if !sameJSON(tools[key], []byte(`{"enabled":false}`)) {
return false
}
diff --git a/internal/runner/provider/codex/live_config_test.go b/internal/runner/provider/codex/live_config_test.go
index 0e05f9fb..3a9bfcfb 100644
--- a/internal/runner/provider/codex/live_config_test.go
+++ b/internal/runner/provider/codex/live_config_test.go
@@ -62,3 +62,33 @@ func TestCodexLiveConfigStrict(t *testing.T) {
})
}
}
+
+func TestSpecialistQuestionReadback(t *testing.T) {
+ for _, mode := range []string{"valid", "enabled-layer", "missing-layer", "enabled-effective", "default-mode", "other-version"} {
+ t.Run(mode, func(t *testing.T) {
+ v, p := liveConfig(t)
+ layer := v["layers"].([]any)[0].(map[string]any)["config"].(map[string]any)
+ tools := layer["tools"].(map[string]any)
+ delete(tools, "update_plan")
+ p.Settings = marshal(layer)
+ p.Manifest = marshal(map[string]any{"Action": "implement", "ProviderVersion": Version})
+ cfg := v["config"].(map[string]any)
+ switch mode {
+ case "enabled-layer":
+ tools["experimental_request_user_input"] = map[string]any{"enabled": true}
+ case "missing-layer":
+ delete(tools, "experimental_request_user_input")
+ case "enabled-effective":
+ cfg["tools"].(map[string]any)["experimental_request_user_input"] = map[string]any{"enabled": true}
+ case "default-mode":
+ cfg["features"].(map[string]any)["default_mode_request_user_input"] = true
+ case "other-version":
+ p.Manifest = marshal(map[string]any{"Action": "implement", "ProviderVersion": "other"})
+ }
+ p.ManifestHash = provider.DigestDirectEvidence(p.Manifest)
+ if got := validateConfig(marshal(v), p); (got == nil) != (mode == "valid") {
+ t.Fatalf("readback mode %s: %v", mode, got)
+ }
+ })
+ }
+}
diff --git a/internal/runner/provider/codex/probe_failures_test.go b/internal/runner/provider/codex/probe_failures_test.go
index 9495eb70..02c8c3c8 100644
--- a/internal/runner/provider/codex/probe_failures_test.go
+++ b/internal/runner/provider/codex/probe_failures_test.go
@@ -31,8 +31,11 @@ func TestSpecialistObservableToolCatalog(t *testing.T) {
t.Error("wrong specialist catalog", m)
}
}
+ if !sameJSON(marshal(settings["tools"]), []byte(`{"experimental_request_user_input":{"enabled":false}}`)) {
+ t.Error("specialist question tool not disabled")
+ }
features := settings["features"].(map[string]any)
- for _, key := range []string{"code_mode", "code_mode_only", "code_mode_host", "multi_agent_v2", "multi_agent_mode", "multi_agent_v2_dynamic_tools", "image_generation", "imagegenext"} {
+ for _, key := range []string{"code_mode", "code_mode_only", "code_mode_host", "multi_agent_v2", "multi_agent_mode", "multi_agent_v2_dynamic_tools", "image_generation", "imagegenext", "default_mode_request_user_input"} {
if features[key] != false {
t.Errorf("%s not disabled: %v", key, features[key])
}
diff --git a/internal/runner/provider/codex/specialist_catalog.go b/internal/runner/provider/codex/specialist_catalog.go
index 80679679..5f6f1b4f 100644
--- a/internal/runner/provider/codex/specialist_catalog.go
+++ b/internal/runner/provider/codex/specialist_catalog.go
@@ -20,5 +20,7 @@ func specialistCatalog(model string) json.RawMessage {
func configureSpecialistCatalog(settings map[string]any, in *provider.PolicyInputs, model string) {
settings["model_catalog_json"] = provider.CoordinatorCatalogPath
settings["web_search"] = "disabled"
+ settings["features"].(map[string]any)["default_mode_request_user_input"] = false
+ settings["tools"] = map[string]any{"experimental_request_user_input": map[string]any{"enabled": false}}
in.Catalog = specialistCatalog(model)
}