Skip to content

fix(delegation): forward background flag to delegate task - #47322

Closed
tmcginn54 wants to merge 1 commit into
NousResearch:mainfrom
tmcginn54:fix/delegate-background-forwarding
Closed

fix(delegation): forward background flag to delegate task#47322
tmcginn54 wants to merge 1 commit into
NousResearch:mainfrom
tmcginn54:fix/delegate-background-forwarding

Conversation

@tmcginn54

Copy link
Copy Markdown

Summary

  • forward the delegate_task background flag through AIAgent._dispatch_delegate_task
  • add a regression test covering async background delegation dispatch

Test Plan

  • uv run --with pytest python -m pytest tests/run_agent/test_run_agent.py::test_dispatch_delegate_task_forwards_background_flag -q -o 'addopts='
  • uv run python -m py_compile run_agent.py tests/run_agent/test_run_agent.py
  • uv run --with pytest python -m pytest tests/tools/test_async_delegation.py -q -o 'addopts='

Notes

Before this fix, model/tool calls that included background=true were silently dispatched synchronously because the flag was dropped at the AIAgent forwarding layer.

@tmcginn54

Copy link
Copy Markdown
Author

Closing as duplicate/already fixed upstream by #46968. I missed that origin/main had moved before opening this; #46968 contains the same runtime fix for forwarding background through AIAgent._dispatch_delegate_task.

@tmcginn54 tmcginn54 closed this Jun 16, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants