Skip to content

feat(delegation): harden governed delegation for enablement (#11266) - #11276

Merged
mrveiss merged 2 commits into
Dev_new_guifrom
issue-11266
Jul 8, 2026
Merged

mrveiss merged 2 commits into
Dev_new_guifrom
issue-11266

Conversation

@mrveiss

@mrveiss mrveiss commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Thinking Path

The governed subagent runner (chat_workflow/delegation.py, #11207) is built and depth-bounded but dormant behind AUTOBOT_DELEGATION_ENABLED (default OFF). Rather than flip it blindly, this hardens the enforcement and documents a validation plan so enabling becomes a safe one-line config change.

What Changed

  • chat_workflow/delegation.py: switched raw os.environ reads to canonical env_flag/env_int (fixes a latent bug where AUTOBOT_DELEGATION_ENABLED=on was silently ignored); added MAX_DELEGATIONS_PER_TURN (default 5); added parent_agent_id observability to run_delegated_subtask; added an "Enablement / validation plan" checklist docstring. Flag stays OFF by default.
  • chat_workflow/tool_handler.py: enforces the per-turn delegation fan-out limit and threads parent_agent_id through. Depth bound remains enforced centrally in run_delegated_subtask (both engines).

Verification

  • chat_workflow/delegation_test.py — 21 passed (no-op when flag OFF, depth-limit rejects depth=MAX, per-turn fan-out limit, forbidden-work enforced, observability).

Closes #11266

Model Used

Claude Opus 4.8

mrveiss and others added 2 commits July 8, 2026 09:33
Applied Black, isort, and autoflake to match code-quality checks.
Triggered by workflow auto-fix-formatting.yml.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

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