-
-
Notifications
You must be signed in to change notification settings - Fork 157
feat: default codex args and workspace CODEX_HOME + args overrides (with tests!) #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add WorkspaceSettings.codexHome and Settings UI to override CODEX_HOME per workspace.
- Worktrees inherit the parent workspace codexHome override (and still support legacy .codexmonitor).
- Normalize CODEX_HOME values (tilde, $VAR/${VAR}, %VAR%) for env/config inputs.
- Respawn app-server sessions when codexHome changes for a connected workspace.
- Add AppSettings.codexArgs and Settings UI to pass extra flags to the codex binary.
- Parse args with shell-words (supports quoting); invalid strings surface as errors.
- Apply args before `app-server` for local backend and daemon spawns.
- Doctor uses the same args when checking `codex app-server --help`.
- Route the "global prompts" directory through CODEX_HOME for the active workspace.
- Local usage scanning reads sessions from the default CODEX_HOME and all workspace overrides.
Defer workspace settings persistence until respawn succeeds to avoid partial state.\nHarden prompt reveal when no workspace and cover with hook tests.\nPolish overrides: group spawn args, trim codex bin, and DRY workspace override drafts.
Support per-workspace codexArgs with parent/app fallback, restart sessions when args change, and expose overrides in settings UI with tests and storage updates
Summary
Scope
Tests (what/why)
Test runs
|
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89ce7157ca
ℹ️ 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".
Ensure connected child worktrees restart when parent CODEX_HOME or codex args overrides change so their sessions pick up new settings.
|
@codex review |
|
We'll get even more review :p |
While we wait, do you have plans to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b56b225f3
ℹ️ 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".
merge patch updates inside updateWorkspaceSettings and remove redundant spreading of existing settings across callers
track workspace settings in a ref to avoid stale state when multiple updates are queued and add a regression test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 386ff252b5
ℹ️ 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".
Resolve relative codex_home values against the workspace or parent path so worktrees inherit correct locations and add tests.
Introduces a new optional 'codexArgs' field to the AppSettings struct in Rust, including its default implementation. Also updates the SettingsView test to include the required 'openAppIconById' prop.

Summary
Adds two first-class Codex runtime controls:
codex app-server(e.g.--profile personal), validated by doctor.CODEX_HOMEoverrides (worktrees inherit).Key Changes
CODEX_HOME+Codex argsadded next toCodex binary.codex_args.rsparses args (shell quoting) and injects them beforeapp-server.codex_doctoruses the same args.CODEX_HOMEresolution~,$VAR/${VAR},%VAR%.codexHomechanges.CODEX_HOME.Why / Justification
codex_home.rs,codex_args.rs) plus plumbing.Behavior Notes
app-server(global flags only).codexArgschanges now respawn active sessions (same behavior ascodexHome)CODEX_HOME/config.toml(UI warns when overrides exist).Tests
npm run lintnpm run testnpm run typecheckcd src-tauri && cargo test