Skip to content

Turn off the Codex plugin for the connector's Claude turns - #1059

Merged
robzolkos merged 1 commit into
mainfrom
connect-claude-without-codex-plugin
Nov 25, 2026
Merged

robzolkos merged 1 commit into
mainfrom
connect-claude-without-codex-plugin

Conversation

@robzolkos

@robzolkos robzolkos commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

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 check passes (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 -p with 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.

Written for commit d86d4c7. Summary will update on new commits.

View guided diff Turn on auto-fix

An orchestrator that had run for three days stopped being able to start
any shell command, even `echo hi`: "command line plus environment exceed
the OS exec argument limit (E2BIG)".

OpenAI's Codex plugin appends three exports to the session's env file on
every SessionStart, and each `claude -p --resume` turn is one. Claude Code
inlines 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, so nothing could run. Restarting the connector didn't help,
because it resumes the same session and the file belongs to it.

Every Claude turn the connector starts, orchestrator and worker, now
passes --settings turning that one plugin off. --settings merges over the
person's own settings, so their other plugins stay on, and Codex stays on
in their own sessions.
@robzolkos
robzolkos requested a review from a team as a code owner November 25, 2026 05:45
Copilot AI balanced review requested due to automatic review settings November 25, 2026 05:45
@github-actions github-actions Bot added the tests Tests (unit and e2e) label Nov 25, 2026

Copilot AI 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.

🔵 Needs a closer look

Recovery under a live connector remains unverified for sessions already broken by E2BIG, since preventing new hook writes does not establish that resuming stops inlining the existing oversized environment file.

No open issues 🎉

What changed in this PR

This PR prevents further session-environment growth from OpenAI’s Codex plugin during long-running connector Claude sessions, avoiding shell failures caused by argument-size limits.

Changes:

  • Disables codex@openai-codex for every connector-managed Claude turn while preserving other plugins and personal sessions.
  • Updates argument assertions for worker, resumed orchestrator, and guarded turns.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
internal/​connector/​runner/​adapter.go Adds per-turn settings to disable the Codex plugin and documents why.
internal/​connector/​runner/​adapter_test.go Updates Claude argument assertions to require the settings override.

Review effort: Balanced

@robzolkos
robzolkos merged commit d8583ae into main Nov 25, 2026
32 checks passed
@robzolkos
robzolkos deleted the connect-claude-without-codex-plugin branch November 25, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants