Skip to content

feat(agents): Let a root's child agents start their own by default - #3641

Merged
dcramer merged 1 commit into
mainfrom
feat/max-agent-depth-default-1
Nov 18, 2026
Merged

dcramer merged 1 commit into
mainfrom
feat/max-agent-depth-default-1

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

With the old default of 0, only the root Conversation can start child agents. A Thread can't start its own sub-Thread or Task, so root → thread → thread doesn't work unless the host sets limits.maxAgentDepth. We want that nesting to work out of the box.

This raises the default limits.maxAgentDepth from 0 to 1. A child of the root now gets spawnAgent. The depth check in spawn.ts still stops grandchildren from starting more.

Hosts that relied on the old default and want root-only spawning have to set limits: { maxAgentDepth: 0 }. The cap of 8 active children per parent is unchanged, so the worst-case fan-out with the new default is 8 children plus 64 grandchildren per root.

Updated the RuntimeLimits JSDoc, design/child-agents.md, and the config reference doc to match.

via @dcramer.

--

View Session [Sentry]

Raise the default limits.maxAgentDepth from 0 to 1, so root -> child -> child works without host config. Grandchildren still cannot spawn.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 18, 2026 4:39am UTC

Request Review

@dcramer
dcramer marked this pull request as ready for review November 18, 2026 04:39
@sentry-junior
sentry-junior Bot requested a review from dcramer November 18, 2026 04:39
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 18, 2026
@dcramer
dcramer enabled auto-merge (squash) November 18, 2026 04:40
@dcramer
dcramer merged commit 35050d7 into main Nov 18, 2026
49 checks passed
@dcramer
dcramer deleted the feat/max-agent-depth-default-1 branch November 18, 2026 04:55
@github-actions

Copy link
Copy Markdown
Contributor

11 screenshot changes — 11 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automations Expanded Row · Desktop
Automations Expanded Row · Desktop
Changed
Automations Expanded Row · Mobile
Automations Expanded Row · Mobile
Changed
Automations Expanded Row Light · Desktop
Automations Expanded Row Light · Desktop
Changed
Automations Expanded Row Light · Mobile
Automations Expanded Row Light · Mobile
Changed
Conversation Question · Desktop
Conversation Question · Desktop
Changed
Show 5 more changed screenshots
Conversation Question Light · Desktop
Conversation Question Light · Desktop
Changed
Conversation Question Picks And Text · Desktop
Conversation Question Picks And Text · Desktop
Changed
Conversation Question Stepper · Desktop
Conversation Question Stepper · Desktop
Changed
Inbox Snooze · Desktop
Inbox Snooze · Desktop
Changed
System Cache Warming Refill · Desktop
System Cache Warming Refill · Desktop
Changed

dcramer pushed a commit that referenced this pull request Nov 18, 2026
…aps (#3697)

Daily design docs audit for the commits on `main` from 2026-11-17 17:00
UTC to 2026-11-18 17:00 UTC. All six files were in scope.
`automations.md` needs no change.

**New gap**
- `review-desk.md`: the "Needs you" group in the classic Inbox shows
every open action in the viewer's list, including actions for Everyone
and actions with no assignees
(`packages/junior-dashboard/src/client/review-desk/reviewItemFormat.ts:277`,
used in `ReviewDeskPage.tsx:82,187`). The waiting rule behind the Inbox
count and the new Inbox's To do leaves those out
(`reviewItemFormat.ts:205-212`,
`packages/junior/src/chat/review-items/access.ts:81-87`). This breaks
"'Needs you' means one thing on every surface". It predates this window.

**Closed gaps, deleted**
- `guardian.md`, plugins cannot declare destination facts: closed by
#3596. The `review-context` manifest field reaches the
Guardian prompt (`packages/junior/src/chat/plugins/manifest.ts:298`,
`packages/junior/src/chat/agent/tools.ts:538`).
- `guardian.md`, Sandbox commands are not reviewed: closed by
#3602. `bash` is now `auto` and destructive, so Guardian
reviews every call
(`packages/junior/src/chat/tools/sandbox/bash.ts:6-14`).

**Contract cuts**
- `guardian.md`: prompt placement, sort order, and caching of
destination facts; the repeat of `data_exposure`.
- `child-agents.md`: the Agent invocation implementation, the rollout
flag (which is not on `main`), and the `archiveAgent` tool details in
Gaps. #3435 stays as a tracking link.
- `sandbox-credentials.md`: the env var line (repeats the Intent and
`sandbox-credentials#env-placeholder`) and the per-plugin Git/Sentry
examples.
- `github.md`: "still".

Intent changes in the window were made on purpose and already edited the
docs in the same PR: #3641 (child agent depth default),
#3685 (re-request review), and #3556
(browser rule, Sandbox credential gaps closed). Nothing to rewrite.

<!-- junior-request-attribution:start -->
via [automation
`sched_5076e4cb686a5e474279137daf734019`](https://junior-prod.sentry.dev/automations/sched_5076e4cb686a5e474279137daf734019)
· Run ID `sched_5076e4cb686a5e474279137daf734019:1795021200000`.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!--
junior-conversation-id:agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5
-->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_3e483611a5715041c71d852b396d64e5/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — be38d572 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant