fix: close finished subagents using the active namespace - #928
virajchoudhary wants to merge 3 commits into
Conversation
A native agents parent could issue a bare-target interrupt and still receive a synthetic collaboration close for the same child. Resolve target aliases, select a proven native namespace from inventory or deferred typed history, and fail closed on ambiguous identities. Keep v2 failover gating independent from close injection.
|
CI triage for #928 at |
|
Follow-up to the CI diagnosis above: #927 is the independent, one-file test-only fix for this exact date-expired renderer fixture. Its patch pins the page clock to 2026-09-10 before navigation; it does not change production code. #927 is currently draft with workflows |
|
Dependency update: #927 was closed without merging in favor of the maintainer's #929, which fixes the same rolling-date renderer fixture by deriving bucket days from today. #929 is now on |
|
Final CI update for head |
|
Additional validation on the unchanged |
Summary
A native Sol parent configured with
tool_namespace = "agents"completed a child task and issuedagents.interrupt_agentfor the bare targetnative_regression_probe. The child'sFINAL_ANSWERidentified/root/native_regression_probe. The router compared those strings exactly, queued a duplicate close, and injectedcollaboration.interrupt_agentregardless of the active namespace. Codex rejected the synthetic call withunsupported call: collaborationinterrupt_agent(parent rollout01a0de21-371f). This is independent of the Azure ciphertext repair in #923 and is deliberately a separate branch.The router now deduplicates bare/root-qualified child targets, selects one supported native lifecycle namespace (
collaborationoragents) from the advertised inventory, or from unambiguous typed history when the inventory is genuinely empty/deferred, and uses it for SSE and JSON synthetic closes. Unknown, conflicting, partial, unrelated MCP/default-function, and flattened-looking unqualified identities fail closed without emitting a guessed call. V2 failover gating remains separate from close-namespace selection: a supported nativeinterrupt_agentkeeps v1 fallback out even when an ambiguous inventory prevents injection; spawn-only fixtures retain their prior fallback behavior. No credential handling, user configuration, or installed service source changes are included.Reproduction and regression
agents.spawn_agent,agents.wait_agent,agents.interrupt_agent({"target":"native_regression_probe"}), followed by a router-generatedcollaboration.interrupt_agent({"target":"/root/native_regression_probe"})and Codex outputunsupported call: collaborationinterrupt_agent.agents__spawn_agentdefault-function name, and two directions of partial native-inventory ambiguity. The model-failover regression caught a v1 candidate reappearing for a reverse partial split. The focused router E2E exercises native deferredagentshistory through the HTTP/SSE path.Verification
subagent-completion,namespace-relay, andmodel-failoversuites: 208/208 passed after the final identity/failover changes.model-failover-router.test.mjs: 41/41 passed after narrowing the v2 gate to nativeinterrupt_agentavailability; four existing cross-protocol failover tests caught and guided that correction.npm run checkpassed (syntax, seven v2 applications, 18 changelog fragments);git diff --checkpassed. A fresh independent verifier passed the final focused diff, including the previously failing partial-inventory and literal-name collision cases.spawnSyncstatusnull), and the serial attempt was stopped after 435 passing cases when an unrelated profile-switch file progressed very slowly. Please use the PR's full CI matrix for final suite evidence.Installed service and SSE boundary
The working router installation was preserved. Its elevated read-only doctor reported the Azure route, service, internal/caller-key ACLs, and router health OK. A fresh read-only CLI session through that installed service ran Azure Sol -> curated Luna Max, a shell tool, and a bare-target close without reproducing a duplicate in that particular turn. It used the existing installed code, not this branch; no patched-service live claim is made.
Synthetic SSE close events can exhibit sequence values
3,4,2. That same ordering occurs on unchanged upstream and this branch. Current Codex's Responses SSE event parser does not deserializesequence_number, and no failing consumer trace was found; this PR does not expand into a speculative sequencing rewrite. Reviewers using another strict SSE consumer should treat that as a separate compatibility question.This PR does not change #923 or its Azure-only plaintext transport boundary.