Skip to content

docs(delegate): drop the nonexistent delegate_task(background=true) from docs - #109744

Open
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-109730
Open

liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-109730

Conversation

@liuhao1024

Copy link
Copy Markdown

What does this PR do?

Three texts told agents to call delegate_task(background=true), but DELEGATE_TASK_SCHEMA (tools/delegate_tool.py) does not expose a background property — the code comment right at the schema marks it "Unadvertised; do not re-add", and _model_background_value states 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-level delegate_task always 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

  • 📝 Documentation update

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 no background argument, orchestrator children wait inline.
  • website/docs/user-guide/features/delegation.md — "Stall Detection" intro now says every top-level delegate_task runs detached automatically instead of showing a background=true call.
  • tools/AGENTS.md — same root cause, third occurrence found while fixing the two above: the delegation section said "the parent waits for the summary unless background=true", which inverts the actual default. Rewritten to the same real contract.

How to Test

  1. git grep -n "delegate_task(background" \ — should return no hits after this change (Observed result: zero hits across skills/, website/, tools/AGENTS.md, docs/).
  2. sed -n '598,665p' tools/delegate_tool.py — DELEGATE_TASK_SCHEMA parameters are tasks / action / subagent_id / message only; 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.
  3. Sanity: .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 pristine upstream/main checkout (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

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass (docs-only change; ran the delegation module tests/tools/test_delegate.py as sanity — 80 passed, 1 pre-existing failure reproduced identically on pristine upstream/main, see How to Test)
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features) — N/A, documentation-only
  • I've tested on my platform: macOS (darwin 25.4.0, arm64)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A (wording fix only, no workflow change)
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A (no behavior change)

…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
@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have tool/delegate Subagent delegation labels Sep 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs describe a delegate_task(background=true) parameter that doesn't exist

2 participants