Skip to content

docs: map subagent concurrency and live limits in the pstack adapter - #70

Merged
ibetitsmike merged 5 commits into
mainfrom
mike/pstack-adapter-subagent-limits
Nov 9, 2026
Merged

ibetitsmike merged 5 commits into
mainfrom
mike/pstack-adapter-subagent-limits

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Part of #7 and #8.

Updates docs/fork/pstack-adapter.md for #47 and #49, which add subagent concurrency and live limits behind fork-nested-subagents, and for #65, which adds user-tier agent definition routes behind fork-agent-definitions. The page now says what fork main at e155b422a2 does.

  • Subagent limits. A new section under Nested subagents. It keeps the default of at most 10 subagent turns at once, with queued children, and says an Enterprise deployment doesn't have that cap while its Agent Runtime Hours entitlement is enabled and below its hard limit. With the experiment, --chat-max-concurrent-subagents and --chat-max-concurrent-subagents-per-family also queue children, and a child's own ancestors don't count against the default cap or these limits, so a coordinator in wait_agent doesn't block its workers and more than 10 subagent turns can run at once. --chat-max-live-subagents-per-family counts unarchived subagents that are running, interrupting, requires_action, or paused. At the limit, spawn_agent fails with cannot create a child agent: this chat family has, and message_agent to a finished child fails with cannot resume the child agent:. The agent then pages through list_agents with has_more and offset, and waits on a running, interrupting, or paused child, keeping a paused child unless the user says otherwise. Otherwise requires_action children or the children's own workers, which list_agents doesn't show, hold the limit, so the agent calls interrupt_agent on each child whose remaining work it doesn't need. That interrupts the child's active descendants for any status. An interrupted requires_action child runs again before it stops, so the agent waits on it before retrying. For descendants it can't wait on, it runs sleep 30 and retries, and tells the user only after several retries fail. The flags default to 0, which means no limit, and the organization's max_concurrent, max_concurrent_per_family, and max_live_per_family values apply too, with the lower value winning.
  • Subagent fields. The "More than 10 running subagents" row says the experiment allows more than 10 and links to the new section. Its advice and status (W2) stay.
  • Custom agent types (feat: serve user-tier agent definitions behind fork-agent-definitions #65). One sentence says the API now stores a user's definitions in an organization, but spawn_agent doesn't offer stored definitions yet. The catalog still reads only the chat's pinned context.
  • Evidence. The header names e155b422a2. feat: enforce subagent concurrency limits behind fork-nested-subagents #47 and feat: enforce the live subagent limit per family behind fork-nested-subagents #49 shifted the cited lines in fork_subagents.go, subagent_operations.go, worker.go and codersdk/fork_chat_config.go, and every cited range was rechecked line by line against e2f73afa5d. feat: enforce subagent concurrency limits behind fork-nested-subagents #47 replaced maxSubagentDepth with subagentLimits in fork_capacity.go, so the organization max_depth reference and the subagentCanSpawn range now point there and at the new function body. New bullets cite the flags, subagentLimits, the admission wrapper, the live limit on spawn and resume, its error, the live-status query, the user routes, and the catalog's pinned-context read.

Validation

Xum opened this PR on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T21:51:34.751283Z 5b090d0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: d3a6790ec9

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

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

Copy link
Copy Markdown

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: afe876cce9

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

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

Copy link
Copy Markdown

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: 6fc271bcb5

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

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

Copy link
Copy Markdown

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: 314c35e640

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
…qualify the licensed cap in the pstack adapter
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike on this comment.

@codex review

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

Copy link
Copy Markdown

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: 5b090d0085

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/fork/pstack-adapter.md Resolved
Comment thread docs/fork/pstack-adapter.md Resolved
@ibetitsmike
ibetitsmike merged commit 20eb8dc into main Nov 9, 2026
10 checks passed
@ibetitsmike
ibetitsmike deleted the mike/pstack-adapter-subagent-limits branch November 9, 2026 22:12
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head 5b090d0085dae656917fac4f9652cfc1bddef718 (docs-only, docs/fork/pstack-adapter.md):

  • fork-ci pull_request run 42705826923 passed on this exact head, created after main e155b422a2. Main has since moved by fix(site/src): play agent-attached MP4s from the turn Attachments menu #68 (d528cdba19), which changes only site/ files; no file overlap with this PR, and git merge-tree against current main is clean.
  • Codex r5 on this head raised two P2 recovery edge cases; both were declined in one line and resolved. 0 unresolved review threads. Merge state CLEAN.

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