Conversation
…ogress messages The delegate_task progress message now includes a [provider/model] tag (e.g. `[xai-oauth/grok-build-0.1]`) so users know which LLM model the sub-agent runs on, directly from the running agent — no config needed. Changes: - agent/display.py: add _get_delegation_model_label() helper - agent/tool_executor.py: pass provider/model through callback kwargs from both concurrent and sequential tool execution paths - gateway/run.py: read provider/model from callback kwargs instead of shared agent_holder (which had a race condition) - tools/delegate_tool.py: capture child.provider in result dict
The delegate_task progress label was reading the PARENT agent's runtime provider and model (via getattr(agent, 'provider', None)) instead of the subagent's configured delegation values. This caused the progress message to show [opencode-go/deepseek-v4-flash] even when the subagent was correctly running on [xai-oauth/grok-build-0.1]. Fix both call sites: - agent/tool_executor.py: spinner label reads from delegation config - gateway/run.py: Telegram progress message reads from delegation config
tonydwb
approved these changes
Jun 16, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Fixes delegation config to read provider/model from delegation config instead of parent agent. Corrects config propagation in nested delegation (4 files, ~14KB diff).
Looks Good
- Correct fix for config field resolution in delegation
- No security or performance concerns
Reviewed by Hermes Agent (cron batch, 2026-06-16)
Collaborator
|
We do not want this |
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.
Summary
Reads
delegation.provideranddelegation.modelfrom config.yaml and prepends a[provider/model]tag to delegate_task progress lines across three display surfaces:get_cute_tool_message) →┊ 🔀 delegate [xai-oauth/grok-build-0.1] 1x: clean addresses🔀 [xai-oauth/grok-build-0.1] delegating 1 task · (/agents to monitor)Returns empty string when no delegation override is configured, so users inheriting the parent model see no change.
Ref: #12794 (observability component)
What does this PR do?
Threads the delegation config provider/model through every display surface, so users see which LLM model their sub-agent actually runs on directly in the progress output — no config digging needed, no session ID cross-referencing.
Key design decisions:
Config-driven, not runtime capture. Reads
delegation.provideranddelegation.modeldirectly fromconfig.yaml, not fromgetattr(agent, "provider", None). The original implementation read from the parent agent, which caused it to show[opencode-go/deepseek-v4-flash]even when the subagent was correctly running on[xai-oauth/grok-build-0.1].Fallback chain: gateway → tool_executor kwargs → delegation config. Each layer tries the next if empty, so the tag degrades gracefully when no delegation override is set.
Result dict also captures
child.provideralongsidechild.model(added intools/delegate_tool.py) so the post-run cute tool message shows the actual runtime model the subagent finished on (which may differ from config if runtime fallback activated).Changes Made
tools/delegate_tool.pyproviderkwargs to child progress callback identity, capturechild.providerin result dictagent/display.py_get_delegation_model_label()helper, wire intoget_cute_tool_messagefor delegate_task result displayagent/tool_executor.pygateway/run.pyHow to Test
delegation.provideranddelegation.modelin config.yaml (e.g.xai-oauth/grok-build-0.1)hermesand calldelegate_taskwith any goal[xai-oauth/grok-build-0.1]tag appears in:Fixes bug introduced in 37fa51f (original read parent agent provider/model instead of delegation config).