Skip to content

[DRAFT] fix(tools): support delegation reasoning overrides for subagents - #5337

Closed
MestreY0d4-Uninter wants to merge 1 commit into
NousResearch:mainfrom
MestreY0d4-Uninter:fix/delegation-reasoning-routing
Closed

[DRAFT] fix(tools): support delegation reasoning overrides for subagents#5337
MestreY0d4-Uninter wants to merge 1 commit into
NousResearch:mainfrom
MestreY0d4-Uninter:fix/delegation-reasoning-routing

Conversation

@MestreY0d4-Uninter

@MestreY0d4-Uninter MestreY0d4-Uninter commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

This PR is logically independent from the ACP adapter fixes.
It came out of the same GitHub Copilot / delegation audit, and I’m opening it as a draft early to reduce the risk of upstream drift.

Summary

This PR improves delegation behavior so subagents can use explicit reasoning settings instead of blindly inheriting the parent agent’s reasoning configuration.

What changed

  • add support for delegation.reasoning_effort
  • pass the resolved reasoning configuration into child agents
  • preserve the newer ACP delegation transport overrides (acp_command / acp_args) while wiring reasoning overrides on top
  • add focused tests covering reasoning override behavior for delegated subagents

Why

Delegation should be predictable and configurable, especially when the parent agent is using a different reasoning profile than the intended worker/subagent lane.

This makes subagent routing more explicit and less surprising.

Validation

Automated

  • python3 -m py_compile tools/delegate_tool.py hermes_cli/config.py tests/tools/test_delegate.py
  • uv run --extra dev python -m pytest -o addopts='' tests/tools/test_delegate.py -q -k 'DelegationReasoningEffort'
  • Result: 2 passed, 51 deselected

Notes

  • On current upstream this required a small refresh because tools/delegate_tool.py has evolved since the original branch, specifically around ACP delegation transport overrides.
  • The resulting patch is still small and localized.

@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor Author

Follow-up from the same GitHub Copilot / ACP audit.

This one is more logically separable than the ACP session/run-agent fixes, but it was validated locally on top of the same rebased stack.
Keeping it as a draft to avoid drift while #4536 is still pending.

Related PRs:

@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor Author

Update after refreshing this branch against current main:

This draft no longer carries the ACP base commit in its diff. It is now cleanly scoped to the delegation reasoning change itself, so it can be reviewed much more independently from #4536 / #5335 / #5336.

@MestreY0d4-Uninter
MestreY0d4-Uninter force-pushed the fix/delegation-reasoning-routing branch from ffb1ff4 to 6576751 Compare April 6, 2026 17:03
@MestreY0d4-Uninter
MestreY0d4-Uninter marked this pull request as ready for review April 6, 2026 17:46
@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor Author

Closing as absorbed by current main. I attempted a clean refresh of this branch against current , and the rebase conflicted specifically because the main branch already contains the delegation reasoning-effort behavior and its dedicated test coverage. I then validated the current upstream surface directly in a clean tmux-based run:
67 deselected in 0.04s -> . So this PR no longer represents a needed delta on top of current main.

@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor Author

Correcting the closure note with the exact evidence:

I attempted a clean refresh of this branch against current origin/main, and the rebase conflicted specifically because the main branch already contains the delegation reasoning-effort behavior and its dedicated test coverage.

I then validated the current upstream surface directly in a clean tmux-based run:

  • uv run pytest -o addopts='' tests/tools/test_delegate.py -q -k 'DelegationReasoningEffort'
  • result: 4 passed

So this PR no longer represents a needed delta on top of current main.

@MestreY0d4-Uninter
MestreY0d4-Uninter deleted the fix/delegation-reasoning-routing branch April 27, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant