Repository navigation
Conversation
Add a CODEX_PLUGIN_CC_ARGS environment variable. When set, its value is tokenized (shell-style) and prepended to every codex invocation the plugin makes: the app-server runtime spawn and the availability checks. This lets users force codex global overrides (e.g. a custom provider via `-c model_provider=...` or `--profile`) without editing config.toml, and without a per-command flag. Previously only --model/--effort were forwarded and the app-server was always spawned as `codex app-server`. - args.mjs: getCodexPassthroughArgs(env) + CODEX_PLUGIN_ARGS_ENV - app-server.mjs: prepend args to the `codex app-server` spawn - codex.mjs: prepend args to `--version` / `app-server --help` checks - fake codex fixture: tolerate leading global flags, record boot argv - tests: unit tests for the parser + e2e passthrough assertion - README: document the variable Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da5b881948
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
splitRawArgumentString treated `\` as an escape even inside single quotes, so CODEX_PLUGIN_CC_ARGS values like `--add-dir 'C:\work\repo'` were mangled into `C:workrepo`. Handle single-quote context before the escape check so single-quoted content is literal (POSIX semantics); double-quote escaping is unchanged. Addresses the Codex review comment on openai#419. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6f1ab7714
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
splitRawArgumentString treated `\` as an escape regardless of quote context, so CODEX_PLUGIN_CC_ARGS values with backslashes were mangled — e.g. `--add-dir 'C:\work\repo'` and `--add-dir "C:\work\repo"` both became `C:workrepo`. Apply POSIX quoting semantics: - single quotes: everything literal, including backslashes - double quotes: backslash only escapes " \ $ ` ; before any other char it stays literal (so `"a\"b"` still yields `a"b`) Adds unit tests for single/double-quote backslash handling. Addresses the Codex review comments on openai#419. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
f6f1ab7 to
2f75ad1
Compare
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@klmklmnb Any chance of moving forward with it? Codex does not support plugins with project scopes (and it's a mess for a while) - openai/codex#18115 This PR will help to fit everything in for this case too, sending something like Thank you |
|
@codex review All existing review threads are resolved. Please review the current head ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f75ad1621
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab10b9ce78
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…args # Conflicts: # plugins/codex/scripts/lib/process.mjs
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review The follow-up percent-expansion finding is fixed in a4d25dab7e4136ad18962bf62622533382d83e2b. All review threads are resolved; please review the current head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4d25da35d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review The PowerShell-shell finding is fixed in 433b846b5973b84aeafef395d80b305c0729c4c6. All review threads are resolved; please review the current head. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
@kvokka Thanks for the nudge! I’ve now addressed all code review issues, including the Windows/PowerShell handling. The PR is ready for another look and should support your CODEX_PLUGIN_CC_ARGS="-p foo" use case. Appreciate your patience! |
|
Thank you so much for such a quick response and for refreshing the PR. Hope that will be merged soon |
What
Adds a
CODEX_PLUGIN_CC_ARGSenvironment variable. When set, its value is tokenized (shell-style, reusing the existingsplitRawArgumentString) and prepended to everycodexinvocation the plugin makes:codex app-serverruntime spawn (app-server.mjs), which covers both direct and broker modescodex --versionandcodex app-server --help(codex.mjs)Example:
Why
Closes #418. Previously only
--model/--effortwere forwarded and the app-server was always spawned bare, so there was no way to pass Codex global overrides (custommodel_provider,--profile, arbitrary-c key=value) without editingconfig.toml. This makes it opt-in via a single env var, reusing Codex's own config-override surface.Changes
scripts/lib/args.mjs: newgetCodexPassthroughArgs(env)+CODEX_PLUGIN_ARGS_ENVconstantscripts/lib/app-server.mjs: prepend args to thecodex app-serverspawn (reads the same env passed to the child)scripts/lib/codex.mjs: prepend args to the availability checkstests/fake-codex-fixture.mjs: tolerate leading global flags before the subcommand; record boot argvtests/args.test.mjs(new): unit tests for the parsertests/runtime.test.mjs: e2e test asserting the args reach the codex processREADME.md: documents the variable, quoting, and the shared-runtime caveatTesting
npm test— 95/95 passing locally.Notes
-c/--profile.