Turn off the Codex plugin for the connector's Claude turns
Why
An orchestrator that had run for three days stopped being able to run any shell command, even echo hi. Every Bash call failed with "command line plus environment exceed the OS exec argument limit (E2BIG)". It couldn't send work to workers or reply in Basecamp, and restarting the connector didn't help.
The cause is OpenAI's Codex plugin. Its SessionStart hook appends three export lines to the session's env file every time, and each claude -p --resume turn the connector runs counts as a SessionStart. Claude Code pastes that file into the single bash -c argument of every Bash call. After 375 turns the file was 133.5 KB, past Linux's 128 KiB limit on one argument. A restart resumes the same session, and the file belongs to that session, so it stayed broken.
What
Every Claude turn the connector starts, orchestrator and worker, now passes:
--settings '{"enabledPlugins":{"codex@openai-codex":false}}'
--settings merges over the person's own settings, so only that plugin is off. Their other plugins still load, and Codex stays on in their own sessions.
Nothing to do for anyone running the connector beyond upgrading.
Testing
-
make checkpasses (linted with golangci-lint v2.11.1, the version CI uses) - The adapter test now expects the flag on worker, orchestrator and guarded turns.
- Ran
claude -pwith and without the flag. With it, the Codex plugin and its skills don't load, its hook writes nothing to the session's env file, and the other plugins load as usual. Without it, the hook writes its exports. - Not yet run under a live connector.
Summary by cubic
Fixes shell commands failing with E2BIG after days of continuous running by disabling OpenAI's Codex plugin on the connector's Claude turns.
The Codex plugin appends its exports to the session env file on every SessionStart, and each claude -p --resume turn counts as one. After 375 turns the file grew past Linux's 128 KiB limit per argument, so no Bash command could start. Restarting the connector did not help because it resumes the same session, and the oversized file belongs to it.
Every Claude turn — orchestrator and worker — now passes --settings to turn off that one plugin. The setting merges over the person's own settings, so their other plugins load normally and Codex stays on in their own sessions.