Repository navigation
Description
pull --apply's refuse-list (push.ts:158-169) covers .claude/, .opencode/, .husky/, .mcp.json, opencode.json(c), .envrc and two .vscode/ files. It does not cover .codex/, and .codex/config.toml can declare an MCP server with an arbitrary command and args that Codex CLI launches on the laptop.
The list's own comment states the invariant it exists to hold:
each makes this machine run a command or start a program the next time an agent, an editor, git or direnv starts here, outside the sandbox
.codex/config.toml meets that description exactly, so this looks like a gap rather than a deliberate omission — Codex is not wired by sbx up today, so it was presumably just never in scope.
Measured
isAgentConfigPath logic from push.ts (AGENT_DIRS / AGENT_FILES / folds / segments), run against the paths in question:
false .codex/config.toml
false .codex
false .codex/AGENTS.md
false .CODEX/CONFIG.TOML
true .claude/settings.json
true .mcp.json
true opencode.json
true .envrc
Every existing entry refuses correctly; the .codex paths pass through. (Replicated from source rather than imported — the package's workspace deps are not installed in the environment I checked from, so this is the matcher's logic, not a call into the built module. Worth confirming with a case added to the 'matches the agent-config and hook paths, and not their neighbours' test in sbx-push.test.ts:1035.)
Why it matters
A patch from the sandbox that creates .codex/config.toml is applied into the working tree today. The file is typically untracked, so git diff after pull --apply would not show it, and the next codex run in that repository starts the named command locally — the same escape the refuse-list blocks for .mcp.json and opencode.json.
Reachability is the normal pull --apply threat model: whatever can write to the sandbox workspace can propose the patch. No Codex configuration by sbx up is required for this — only that the developer has Codex installed, which is increasingly likely and is the premise of the companion request to support it (#TBD).
Per docs/sbx/user-guide.md §3 the refusal is also what tells a user to inspect such a patch by hand (pull -o FILE), so the omission costs the warning as well as the block.
Suggested fix
One entry in AGENT_DIRS:
const AGENT_DIRS: Record<string, string> = {
'.claude': 'Claude Code settings, hooks and commands',
'.opencode': 'OpenCode configuration and plugins',
'.codex': 'Codex CLI configuration, which can start MCP servers',
'.husky': 'git hooks',
};A directory entry already matches at any depth and under the existing case/Unicode folding, so this covers .codex/config.toml, .CODEX/... and a bare .codex file-or-link where the directory goes — consistent with how .claude is handled.
Two things worth a maintainer's judgement:
AGENTS.override.md. Codex reads it in preference toAGENTS.md, andPROMPT_FILEScurrently lists onlyclaude.mdandagents.md. Prompt files are warned about rather than refused ("they are text, not executables"), so the same reasoning applies — but a reader of the warning would not learn that an override file had appeared. Addingagents.override.mdtoPROMPT_FILESkeeps the warning honest.~/.codex/config.toml. Out of scope here: a patch cannot write outside the working tree. Noting it only so the global/project distinction is explicit in any follow-up.
Relationship to the Codex support request
Independent of it. This should hold whether or not sbx up ever writes Codex configuration, and it is the smaller and more urgent of the two: the support request is a feature decision, this is a hole in an invariant the code already claims. Filing separately so it can land on its own.
Activity
fix(sbx): warn for AGENTS.override.md, and re-wrap the pull paragraph
fix(sbx): pull --apply refuses .pi/, which Pi loads as code
fix(sbx): pull --apply refuses .codex/, which can start MCP servers
fix(sbx): warn for a pulled .bobrules, as for the other steering files
fix(sbx): pull --apply refuses .bob/, IBM Bob's settings