You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds operator-controlled capability lanes to the existing delegate_task tool:
explore
engineer
review
The model may request a capability label, while the operator owns the provider/model/reasoning mapping in delegation.lanes.
delegation:
lanes:
explore:
enabled: trueprovider: openai-codexmodel: <operator-selected-model>reasoning_effort: medium
delegate_task(goal="Inspect this codebase", lane="explore")
Motivation
Raw per-call model selection was intentionally rejected in #10996 because exposing model in the tool schema bypasses credential resolution, cost guardrails, and operator control. The tier/profile direction discussed in #9737 and #11155 is useful, but those proposals also accumulated heuristic routing, free-form tiers, reasoning floors, and unrelated complexity.
This PR keeps only the narrow safety boundary:
the model sees a fixed capability enum, never provider/model names;
the operator selects the actual route in config.yaml;
arbitrary model/provider/API key/base URL/request/command overrides remain absent from the model-facing schema;
invalid, disabled, unknown, or incomplete lane configuration fails closed;
no heuristic router, extra LLM call, config cache, credential-pool change, or new tool is introduced.
Behavior
Resolution precedence:
per-item tasks[].lane;
top-level lane;
no lane: existing delegation behavior, unchanged.
Reasoning precedence for a configured lane:
lane reasoning_effort;
global delegation override;
parent reasoning effort.
A configured lane resolves through Hermes' existing credential/provider pipeline before the child is created. A mixed batch may request different capabilities per item without receiving deployment-specific routing details.
Compatibility and footprint
Backward-compatible when lane is omitted.
Extends the existing delegate_task schema rather than adding a core tool.
Static schema; does not mutate toolsets or the system prompt mid-conversation.
No credentials or deployment-specific model IDs are versioned.
No changes to credential pools, providers, gateway, memory, plugins, or agent prompts.
Rebased as one commit on current main before push.
Changed production paths are limited to:
tools/delegate_tool.py — lane schema, validation, config resolution, and child routing;
run_agent.py — propagate the optional lane through the existing dispatcher;
Thanks for the careful implementation and for keeping raw provider and credential values out of the model-facing schema.
Automated hermes-sweeper review found that this PR falls under the standing delegation-model-routing policy: Hermes does not support per-call or per-task model/provider routing through delegate_task, including fixed capability/tier labels that resolve to different configured routes. Current main keeps the sanctioned routing control at the global delegation.provider / delegation.model configuration level (tools/delegate_tool.py:3755).
This PR adds top-level and tasks[]lane choices that select provider/model/reasoning routes (tools/delegate_tool.py, PR commit 5c55438543c1).
The operator-controlled mapping and fail-closed validation are thoughtful, but they do not change the policy match: the model can still select a per-task route.
A focused re-scope using the existing global delegation configuration is the supported alternative.
Closed as not-planned per standing maintainer policy (delegation-model-routing). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.
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
area/configConfig system, migrations, profilescomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointcomp/cliCLI entry point, hermes_cli/, setup wizardneeds-decisionAwaiting maintainer decision before any implementationP3Low — cosmetic, nice to havesweeper:not-plannedSweeper: closed per standing maintainer policy (design direction)sweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradestool/delegateSubagent delegationtype/featureNew feature or request
3 participants
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.
Summary
Adds operator-controlled capability lanes to the existing
delegate_tasktool:exploreengineerreviewThe model may request a capability label, while the operator owns the provider/model/reasoning mapping in
delegation.lanes.Motivation
Raw per-call model selection was intentionally rejected in #10996 because exposing
modelin the tool schema bypasses credential resolution, cost guardrails, and operator control. The tier/profile direction discussed in #9737 and #11155 is useful, but those proposals also accumulated heuristic routing, free-form tiers, reasoning floors, and unrelated complexity.This PR keeps only the narrow safety boundary:
config.yaml;Behavior
Resolution precedence:
tasks[].lane;lane;Reasoning precedence for a configured lane:
reasoning_effort;A configured lane resolves through Hermes' existing credential/provider pipeline before the child is created. A mixed batch may request different capabilities per item without receiving deployment-specific routing details.
Compatibility and footprint
laneis omitted.delegate_taskschema rather than adding a core tool.mainbefore push.Changed production paths are limited to:
tools/delegate_tool.py— lane schema, validation, config resolution, and child routing;run_agent.py— propagate the optional lane through the existing dispatcher;hermes_cli/config.py— commented configuration example;Validation
On current
main(9e2f07e704d6433c118cdb4543e8519e1fa62762):scripts/run_tests.sh tests/tools/test_delegate_lanes.py tests/tools/test_delegate.py tests/tools/test_async_delegation.py -qscripts/run_tests.sh tests/run_agent/test_run_agent.py -k delegate -qpython -m py_compile ...— PASSruff check ...— PASSgit diff --check origin/main...HEAD— PASSA live E2E exercised the full path with an OpenAI Codex parent using one configured
engineerlane child on a different model:Security notes
The model-facing contract intentionally does not accept arbitrary:
This keeps cost, credentials, and deployment routing operator-owned while still allowing the orchestrator to ask for the capability a subtask needs.
Related: #10996, #9737, #11155.