Expand description
Protected GitLab source bootstrap for agent launches. The protected MCP server’s outside wrapper.
Codex spawns this process; it spawns the sandboxed MCP server and then stays alive as that server’s supervisor. Two anonymous descriptors cross the fork and never pass through Codex:
- fd 3 — selected GitLab credentials, read only after Codex has spawned this wrapper, closed as soon as the handoff is acknowledged;
- fd 4 — the supervised execution channel. macOS refuses a nested
sandbox_apply, so the MCP server cannot wrap its own command children in the launcher’s profile; this wrapper runs outside that sandbox and is the only process that starts them.
Both protected starts — with and without a selected GitLab source — run through here, so the boundary is identical.
Structs§
Constants§
- CLIENT_
ENV_ PASSTHROUGH - Client environment we are willing to forward. Everything else is dropped by
env_clear, including profile selectors, API keys and plugin/project config. - MCP_
ENV_ PASSTHROUGH - Environment forwarded to the MCP server only (never to the Codex client), so the server resolves the user’s existing lean-ctx config, data and providers.
- WRAPPER
Functions§
- dispatch
- Runs before logging, telemetry, threads or tools can observe a descriptor.
- ensure_
executable_ file - initialize_
agent_ gitlab - SDK hosts select metadata only; the Engine retains the same bounded, in-memory credential reader and immutable provider binding as Codex.
- prepare
- utf8_
path