feat(delegation): add Codex app-server subagent backend - #24447
Closed
mxdhavgautam wants to merge 5 commits into
Closed
feat(delegation): add Codex app-server subagent backend#24447mxdhavgautam wants to merge 5 commits into
mxdhavgautam wants to merge 5 commits into
Conversation
Contributor
|
Thanks for the thorough implementation and the focused delegation design. This automated hermes-sweeper review is closing this under the standing in-tree provider-integration policy:
This is not a judgment on the quality of the work. Please consider publishing the delegation backend as a standalone plugin repo, which users can install into Closed as not-planned per standing maintainer policy ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an opt-in
codex-app-serverdelegation backend so Hermes can run leaf subagents inside Codex's native app-server harness while keeping Hermes as the reliable top-level agent and nested-orchestration control plane.Why this exists:
This is intentionally narrower than routing all OpenAI turns through Codex app-server. It only affects
delegate_taskwhen the user explicitly configures:Related but distinct work: #24182 explores full optional Codex app-server runtime routing. This PR focuses specifically on subagent delegation backend support.
Related Issue
Fixes #24445
Type of Change
Changes Made
agent/codex_app_server_client.pyCodexAppServerSubagent, a stdio JSON-RPC client forcodex app-serverdelegation children.codexcommands to the required app-server invocation:codex app-server --listen stdio://.none.tools/delegate_tool.pydelegation.provider: codex-app-serveras a special delegation backend instead of a normal runtime provider.CodexAppServerSubagentchildren.delegate_task.spawn_agent/wait_agentstyle tools instead.AIAgentcontrol plane so nested delegation remains reliable.delegation.codex_native_orchestratorsflag, defaultfalse, for dogfooding Codex-native nested spawning later.cli-config.yaml.examplehermes_cli/doctor.pyscripts/install.shTests:
tests/agent/test_codex_app_server_client.pyfor the app-server child client.tests/tools/test_delegate.pyfor Codex app-server credential resolution, native leaf construction, command normalization, and Hermes-vs-Codex orchestrator routing.tests/hermes_cli/test_doctor.pyfor the new doctor checks.How to Test
Targeted validation run on the branch:
Result:
Additional hygiene checks:
Local dogfood checks performed outside the unit suite:
Configured Hermes with:
Verified first-level Codex app-server subagents across terminal/file/web/reasoning tasks.
Verified a fresh Hermes process passes a strict nested/orchestrator acceptance test:
FRESH_PARENT_PASSDogfood environment:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — config example and inline docs updatedcli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AFor New Skills
N/A.
Screenshots / Logs
Relevant local test output:
Fresh-process nested dogfood result:
Notes for reviewers
The important architectural choice is that Codex app-server is the default leaf backend only. Orchestrator children still default to Hermes-native
AIAgentso they get realdelegate_tasksemantics and aggregation. This avoids the stale failure mode seen during dogfooding where a Codex child exposedspawn_agentbut not Hermesdelegate_task, resulting in only one child result being surfaced.If/when Codex-native nested orchestration becomes reliable enough to expose by default, the experimental gate is already present: