Skip to content

docs: clarify local shell approval scope across handoffs - #5385

Merged
seratch merged 2 commits into
mainfrom
docs/shell-approval-scope
Oct 17, 2026
Merged

seratch merged 2 commits into
mainfrom
docs/shell-approval-scope

Conversation

@seratch

@seratch seratch commented Oct 17, 2026

Copy link
Copy Markdown
Member

This pull request updates the human-in-the-loop and tools guides to explain that persistent approvals and rejections for local ShellTool instances are shared by tool name across agent handoffs, including when executors have different permissions.

The guidance recommends per-call decisions when agents have different shell permissions, explains that per-call decisions do not clear existing persistent decisions, and distinguishes agent-scoped function-tool approvals. This documentation describes existing behavior; it does not change the approval implementation.

@seratch seratch added the documentation Improvements or additions to documentation label Oct 17, 2026
@seratch
seratch requested review from a team and rm-openai as code owners October 17, 2026 00:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T00:46:58.205056Z 6f6c18e New commits
🔒 Security Review ✅ Completed 2026-10-17T00:42:40.476283Z 6f6c18e New commits
ℹ️ 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: 210de1e738

ℹ️ 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/human_in_the_loop.md Outdated
Comment thread docs/human_in_the_loop.md Outdated

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 210de1e7385a8d8b654ab01fa014de12f3213dc9 against 17d994bd3045dae71acda676a4ef4762ed8ecd94.

I confirmed the existing approval-lifetime finding as P2. A separate Runner.run(...) call can inherit sticky shell approval when it reuses the same RunContextWrapper. The warning should describe the wrapper/RunState lifetime and explain that a separate approval domain needs a fresh wrapper, or only the application context passed to the new run. Keep the caveat that resuming a RunState preserves its decisions: per-call settings do not clear an existing sticky grant.

The handoff behavior and function-tool distinction otherwise match the implementation. Extending the warning to ApplyPatchTool would be useful, but I do not consider its omission a separate blocker in this patch.

Validation: both changed documents and the relevant approval, context, serialization, and test source; 20 hosted checks passed and 5 skipped at this head. Source-only review; I did not run candidate code or a documentation build.

@seratch

seratch commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

I've resolved the review comments. Can you take another look?

@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: 6f6c18e2e9

ℹ️ 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/human_in_the_loop.md

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 6f6c18e2e984ae6c11cc09d6673641c181ff4631 against 17d994bd3045dae71acda676a4ef4762ed8ecd94. No actionable findings remain.

The updated wording fixes the approval-lifetime issue: it distinguishes a reused RunContextWrapper from a plain application context and explains that overriding context while resuming RunState preserves approvals. The added ApplyPatchTool guidance and the distinction between session history and approval state also match the implementation.

Regarding the new CustomTool comment: its runtime premise is correct. The warning explicitly covers shell and file-edit tools, and the function-tool paragraph refers to FunctionTool, a separate type. I consider a CustomTool warning optional follow-up documentation.

Validation: both changed documents, the surrounding approval/context/serialization code and test source, plus an independent review. At this head, 20 hosted checks passed and 5 were skipped; the passing checks include the documentation build. This was a source-only review; I ran no candidate code, tests, or local documentation build.

@seratch
seratch added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 9abc918 Oct 17, 2026
29 checks passed
@seratch
seratch deleted the docs/shell-approval-scope branch October 17, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants