Skip to content

Implement spawn subagent tool#23876

Open
luisorofino wants to merge 8 commits into
loa/openmetrics-ai-genfrom
loa/subagent-tool
Open

Implement spawn subagent tool#23876
luisorofino wants to merge 8 commits into
loa/openmetrics-ai-genfrom
loa/subagent-tool

Conversation

@luisorofino
Copy link
Copy Markdown
Contributor

@luisorofino luisorofino commented May 29, 2026

What does this PR do?

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@luisorofino luisorofino added the qa/skip-qa Automatically skip this PR for the next QA label May 29, 2026
@dd-octo-sts dd-octo-sts Bot added the ddev label May 29, 2026
@luisorofino luisorofino marked this pull request as ready for review May 29, 2026 09:18
@luisorofino luisorofino requested a review from a team as a code owner May 29, 2026 09:18
@luisorofino luisorofino changed the title Loa/subagent tool Add spawn_subagent tool May 29, 2026
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 29, 2026

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented May 29, 2026

Pipelines  Tests  Code Coverage

Fix all issues with BitsAI

⚠️ Warnings

🚦 5 Pipeline jobs failed

PR All | test / j06ca546 / SNMP   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. ConnectionError: HTTPSConnectionPool(host='ddintegrations.blob.core.windows.net', port=443): Max retries exceeded with url: /snmp/cisco-3850.snmprec (Caused by NameResolutionError: Failed to resolve 'ddintegrations.blob.core.windows.net')

PR All | test / j46da136 / JBoss_WildFly   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. Could not resolve: ddintegrations.blob.core.windows.net:443

PR All | test / j5a9585a / IBM ACE   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. Could not resolve host: ddintegrations.blob.core.windows.net while attempting to execute command.

View all 5 failed jobs.

🧪 20 Tests failed in 1 job

PR All | run   GitHub Actions

test_bulk_table from test_check.py   View in Datadog (Fix with Cursor)
HTTPSConnectionPool(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Max retries exceeded with url: /snmp/cisco-3850.snmprec (Caused by NameResolutionError(&#34;HTTPSConnection(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Failed to resolve &#39;ddintegrations.blob.core.windows.net&#39; ([Errno -2] Name or service not known)&#34;))
test_cast_metrics from test_check.py   View in Datadog (Fix with Cursor)
HTTPSConnectionPool(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Max retries exceeded with url: /snmp/cisco-3850.snmprec (Caused by NameResolutionError(&#34;HTTPSConnection(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Failed to resolve &#39;ddintegrations.blob.core.windows.net&#39; ([Errno -2] Name or service not known)&#34;))

View all 20 test failures

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 97.98%
Overall Coverage: 87.87%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a5757e5 | Docs | Datadog PR Page | Give us feedback!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5757e5e7c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

f"('{self.name}' is not allowed in 'tools')."
),
)
disallowed = sorted(set(tool_input.tools) - self._allowed_tools)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict subagents to the current run's tools

When a caller runs ReActProcess.start(..., allowed_tools=["spawn_subagent"]) or another per-task subset, this validation still compares the child request against _allowed_tools captured from the full registry at construction time. That lets the parent invoke spawn_subagent and ask the child for tools that were intentionally hidden for the current run, bypassing the allowed_tools restriction documented on ReActProcess.start; the effective child allowlist needs to be intersected with the current run's allowlist before building the subagent.

Useful? React with 👍 / 👎.

@luisorofino luisorofino changed the title Add spawn_subagent tool Implement spawn subagent tool May 29, 2026
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

Labels

ddev qa/skip-qa Automatically skip this PR for the next QA team/agent-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants