docs(delegate): drop the nonexistent delegate_task(background=true) from docs - #109744
Open
liuhao1024 wants to merge 1 commit into
Open
liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
…rom docs
DELEGATE_TASK_SCHEMA does not expose a `background` property (the code
comment marks it "Unadvertised; do not re-add"), yet three texts still
taught agents to call `delegate_task(background=true)`. Rewrite them to
state the real contract: a top-level delegation always runs detached and
the result re-enters as a new message; an orchestrator child (depth > 0)
is the inline-waiting exception. tools/AGENTS.md additionally had the
default inverted ("the parent waits for the summary unless
background=true").
Fixes NousResearch#109730
6 tasks
This branch has not been deployed
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?
Three texts told agents to call
delegate_task(background=true), butDELEGATE_TASK_SCHEMA(tools/delegate_tool.py) does not expose abackgroundproperty — the code comment right at the schema marks it "Unadvertised; do not re-add", and_model_background_valuestates that top-level delegations always run in the background and the model does not choose. An agent taking the docs literally either passes an unknown key or invents a polling loop to compensate.This PR rewrites the three spots to state the real contract on current
main: a top-leveldelegate_taskalways runs detached, returns a handle immediately, and the result re-enters the conversation as a new message; an orchestrator child (depth > 0) is the exception that waits inline for its workers. Docs must describe the behavior that ships, so the wording intentionally avoids predicting whether that contract will ever change.Related Issue
Fixes #109730
Type of Change
Changes Made
skills/autonomous-ai-agents/hermes-agent/references/background-systems.md— replaced the "Background:delegate_task(background=true)" bullet with an "Always background" bullet: top-level calls always return a handle, there is nobackgroundargument, orchestrator children wait inline.website/docs/user-guide/features/delegation.md— "Stall Detection" intro now says every top-leveldelegate_taskruns detached automatically instead of showing abackground=truecall.tools/AGENTS.md— same root cause, third occurrence found while fixing the two above: the delegation section said "the parent waits for the summary unlessbackground=true", which inverts the actual default. Rewritten to the same real contract.How to Test
git grep -n "delegate_task(background" \— should return no hits after this change (Observed result: zero hits acrossskills/,website/,tools/AGENTS.md,docs/).sed -n '598,665p' tools/delegate_tool.py—DELEGATE_TASK_SCHEMAparameters aretasks/action/subagent_id/messageonly; the adjacent comment reads "background(bool) is also accepted — DEPRECATED, ignored: top-level delegations always run in the background. Unadvertised; do not re-add." The docs now match this..venv/bin/pytest tests/tools/test_delegate.py -q— 80 passed; the 1 failure (test_child_dedicated_db_follows_parents_db_path) reproduces identically on a pristineupstream/maincheckout (commit b6b53c6) in this environment, i.e. pre-existing and unrelated to a docs-only change. Observed result: docs-only diff, no code path touched.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass (docs-only change; ran the delegation moduletests/tools/test_delegate.pyas sanity — 80 passed, 1 pre-existing failure reproduced identically on pristineupstream/main, see How to Test)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A (wording fix only, no workflow change)