Repository navigation
Extend RunBudget with shared tool and delegation limits - #6211
markstuart-oai wants to merge 3 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (3)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 5e13a0affd
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
Request changes after a comprehensive static review of shared budgets, tool/delegation admission, checkpoint restoration, failed-attempt usage, examples and tests. Independently confirmed the existing canonical tool identity finding: a bare dotted name and a distinct namespaced tool can share the same authorization string across parent/child scopes. Authorize canonical identities or reject cross-scope ambiguity, with a regression covering both inventories. Linking the existing finding instead of duplicating it inline.
Hosted CI at review: 17 passed, 2 skipped, 2 still running. Static review only; no candidate code or tests executed.
Hosted CI update (2026-11-24 07:37 UTC): 18 passed, 4 skipped, 1 failed. Windows 3.10 job failed test_parallel_guardrail_trip_cancels_model_task: the expected guardrail error occurred, but the cancellation event was unset (12,750 passed, 357 skipped). Static inspection suggests a timing-sensitive existing assertion: the unchanged test lets the model finish after 20 ms, while the unchanged cancellation branch cancels only an unfinished task. This is an inference, not a verified flaky rerun; no local tests were run. The existing tool-identity request-changes finding remains.
There was a problem hiding this comment.
Approved after static re-review and an independent review of the tool-identity fix. Allowlist admission now derives its spelling from the actual FunctionTool canonical identity and rejects literal dots in name/namespace components, preventing cross-scope bare/namespaced ambiguity. Validation covers fresh runs, resumed inventories, and execution before hooks; unrestricted start-count budgets preserve dotted-name support. Reviewed both collision directions, both run modes, and nested approval/policy-change regression coverage. The prior request-changes finding is addressed.
Hosted CI on this commit at review: 12 passed, 7 still running. The earlier Windows cancellation-test failure was on the preceding commit and is not a current-head result. No candidate code or local tests were run.
Hosted CI update (2026-11-24 07:57 UTC): 19 passed, 4 skipped; no checks remain pending in the current rollup. Approval is unchanged. No local tests were run.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 7d36a30baf
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 4eccd80f4e
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
Approved after static re-review and an independent review. This revision clarifies that allowlist grants apply to a function name across agents sharing a budget, and adds both-mode coverage showing that a narrower child budget still denies its same-named handler while leaving the parent's grant intact. No production behavior changed.
Reviewed the handoff feedback as well: the documented tool limits cover SDK FunctionTool handlers, while child/depth limits cover Agent.as_tool descendants. A handoff stays within the current root; its callback is outside these counters, and subsequent target function calls retain the root budget checks. I did not find a violation of that stated scope.
Hosted CI at review: 16 passed, 2 skipped and 3 running. Pending checks remain under follow-up. No candidate code or local tests were executed.
Hosted CI follow-up (2026-11-24 08:12 UTC): all checks at this reviewed commit are complete: 19 passed and 4 skipped, with no failures. Approval is unchanged. No candidate code or local tests executed.
|
@codex security review Please reassess the three advisory findings on |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Why
A coordinator has two tool starts available for a task. Giving every delegated agent a separate allowance lets the combined work exceed that limit.
Summary
RunBudgetcan share limits across Python SDK agents. For an existing coordinator namedparent, delegation consumes one start and the child's lookup consumes the other.The complete example also restricts delegation and tools. Resume preserves usage. A name grant covers every matching handler sharing the budget. Handoff callbacks require separate authorization.
CodexProvidersupports per-run outer requests and SDK tool starts, rejects shared child budgets and cannot cap native calls or spending.Parent #6210.
Test plan
Tests passed for concurrent reservations, child restrictions, approval resume, failed-attempt usage and tool identity.
Issue number
None.
Checks
.agents/skills/code-change-verification/scripts/run.sh/reviewbefore submitting this PR