docs(langchain): `CodexSandboxExecutionPolicy` docstring attributes macOS Seatbelt to Anthropic

#41028 · closed · 7 comments

View on GitHub ↗

sauravsolanki

### Submission checklist - [x] This is a bug, not a usage question. - [x] I added a clear and descriptive title that summarizes this issue. - [x] I used the GitHub search to find a similar question and didn't find it. - [x] I am sure that this is a bug in LangChain rather than my code. - [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package). - [x] This is not related to the langchain-community package. - [x] I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS. ### Package (Required) - [x] langchain - [ ] langchain-openai - [ ] langchain-anthropic - [ ] langchain-classic - [ ] langchain-core - [ ] langchain-model-profiles - [ ] langchain-tests - [ ] langchain-text-splitters - [ ] langchain-chroma - [ ] langchain-deepseek - [ ] langchain-exa - [ ] langchain-fireworks - [ ] langchain-groq - [ ] langchain-huggingface - [ ] langchain-mistralai - [ ] langchain-nomic - [ ] langchain-ollama - [ ] langchain-openrouter - [ ] langchain-perplexity - [ ] langchain-qdrant - [ ] langchain-typesafe - [ ] langchain-xai - [ ] Other / not sure / general ### Related Issues / PRs None. ### Reproduction Steps / Example Code (Python) ```python from langchain.agents.middleware import CodexSandboxExecutionPolicy print(CodexSandboxExecutionPolicy.__doc__) # ... # filesystem restrictions provided by Anthropic's Seatbelt (macOS) or Landlock/seccomp # (Linux) profiles. ... ``` ### Error Message and Stack Trace (if applicable) ```shell Not applicable; documentation-only. The sentence is rendered in the public API reference for `CodexSandboxExecutionPolicy`. ``` ### Description The class docstring of `CodexSandboxExecutionPolicy` in `langchain/agents/middleware/_execution.py` (line 195 on master `57236d5`) reads: > Ideal when you have the Codex CLI installed and want the additional syscall and filesystem restrictions provided by **Anthropic's Seatbelt (macOS)** or Landlock/seccomp (Linux) profiles. Two factual errors in one phrase: - Seatbelt is Apple's macOS sandbox facility (`sandbox-exec` / `sandbox_init`), not an Anthropic product. - The Codex CLI is OpenAI's tool, so even "the vendor's Seatbelt profile" would point to OpenAI, not Anthropic. This is a public docstring, so it appears verbatim in the API reference and in IDE hover text. It is a one-line fix with no behaviour change. **Proposed fix** Replace the phrase with something accurate, for example: > ... filesystem restrictions provided by the Codex CLI's sandbox: macOS Seatbelt profiles or Landlock/seccomp on Linux. Happy to open the PR (`docs(langchain): ...`) if assigned. ### System Info langchain master 57236d5; also present in the released langchain 1.4.0 (langchain_core 1.6.3). Documentation only, no runtime dependency. ### Social handles (optional) LinkedIn: https://linkedin.com/in/sauravsolanki GitHub: https://github.com/sauravsolanki

Comments

bhavyup

Following up with the concrete fix so a maintainer can evaluate it before assignment. The issue: `CodexSandboxExecutionPolicy`'s docstring in `libs/langchain_v1/langchain/agents/middleware/_execution.py` says the sandbox provides "restrictions provided by Anthropic's Seatbelt (macOS)". Seatbelt is Apple's macOS mandatory access control framework; it has nothing to do with Anthropic. The Codex CLI itself is OpenAI's, making the misattribution doubly wrong. Fix: one-word change, "Anthropic's" → "Apple's". I have it ready with lint passing. Can I be assigned to open the PR?

boriskozak

Happy to take this one. My approach: a one-line docstring fix in `libs/langchain_v1/langchain/agents/middleware/_execution.py` (`CodexSandboxExecutionPolicy`), replacing "Anthropic's Seatbelt (macOS)" with "the Codex CLI's sandbox: macOS Seatbelt profiles" as proposed in the issue. Seatbelt is Apple's sandbox facility and the Codex CLI is OpenAI's tool, so the current text is wrong in both directions. Docs-only change, no behavior change; I checked and there are no other occurrences of the phrase in the repo. I have the change ready in #41039, which can be reopened once assigned.

kpdagrt22

I would like to address this with a documentation-only correction in libs/langchain_v1/langchain/agents/middleware/_execution.py, in the CodexSandboxExecutionPolicy docstring. Proposed wording: filesystem restrictions provided by the Codex CLI sandbox: macOS Seatbelt profiles or Landlock/seccomp (Linux). This avoids incorrectly crediting Seatbelt to Anthropic and accurately describes the sandbox integration without changing runtime behavior. Please approve and assign me if this approach fits the project direction; I will open a PR after assignment.

kpdagrt22

Following up on my offer: I’m still available to make a documentation-only correction if maintainers prefer my wording and scope. I see others have also volunteered and PR #41039 was closed pending assignment, so I won’t open a competing PR. If you’d like me to take it, please approve the scope and assign me; otherwise I’m happy to defer to the contributor you select.

Oseas031

Docs-only fix ready at #41114 (auto-closed pending assignment). **Root cause:** the `CodexSandboxExecutionPolicy` docstring attributes macOS Seatbelt to Anthropic — Seatbelt is Apple's sandbox facility (`sandbox-exec`/`sandbox_init`), and the Codex CLI is OpenAI's tool. **Approach:** one-line rephrase per the issue's suggestion: "the Codex CLI's sandbox: macOS Seatbelt profiles or Landlock/seccomp on Linux". **Verification:** no behavior change; docstring renders correctly.

bhavyup

No auto-assignment bruh.... LLM behaviour is prohibited 🚫

vedchaudhary2005

Hi! I'd like to work on this issue as my first open-source contribution. Could you please assign it to me?