You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix misleading CLI output when Codex refuses a desktop settings change - #8929
ocx system settings --client-compaction on can save the preference while the history preflight refuses to rewrite the Codex config. In that case the CLI printed both effective on and an instruction to run ocx sync, although repeating the same sync hits the same refusal. Reproduced with the provider lock for paginated conversations on Codex 0.166+.
Report the stored value and the refusal detail. Omit the effective claim and retry instruction for injection_refused. The API response, exit status, history guard and retry advice for write-lock contention are unchanged.
Verification
Ran the new CLI regression against the original formatter and observed the contradictory output. With the fix, 158 tests across the CLI settings, settings apply and paginated-history suites passed in an isolated checkout.
Changed-file suite on Bun 1.4.4 (bun scripts/test.ts --changed=dev): 1,037 passed, 1 platform-specific skip, 0 failures.
On v2.100.5, ran the two paginated-history suites with a disposable home (17 passed), including refusal without mutating existing conversations or config.
bun check --no-script --noEmit passed. git diff --check passed. Full cross-platform suite not run locally for this CLI-only change.
Head 763ac93 review check: CodeRabbit reported no actionable comments. GitHub reported zero review threads and zero submitted reviews. The CLI diff was checked against the server refusal reason and the saved-setting regression. Maintainer approval is pending.
Checklist
Scope stays focused and avoids unrelated cleanup.
Updated the integration guide.
Reviewed the diff for secrets, auth and unsafe defaults.
Summary by CodeRabbit
Bug Fixes
System settings output now distinguishes a saved preference from an active setting when the server refuses to apply a change, and includes the refusal detail without suggesting an ineffective retry.
Documentation
Clarified that a compaction preference may be saved even when the routing change is refused, and that syncing again with unchanged settings may encounter the same refusal.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
No actionable comments were generated in the recent review.
Walkthrough
The CLI now reports stored switch values when applying settings is refused with injection_refused. It does not claim those switches are effective or advise retrying with ocx sync. The CLI test and Codex integration guide cover this behavior.
For injection_refused, the CLI reports the stored setting without claiming it is effective or advising ocx sync. The test checks the output, and the guide states that the preference can be saved while routing remains unchanged.
lidge-jun/opencodex#8510: Adds the history_paginated_openai_provider_locked refusal that this change reports in the CLI.
Merge Risk: Minimal · up to 763ac
The change makes CLI output accurate when Codex refuses a desktop settings change. It stops claiming the setting is effective and stops suggesting a sync retry that would fail again. There is no meaningful merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: CLI output that claimed an effective state when Codex refused a desktop settings change. The raw summary shows the change in src/cli/system-command.ts makes settingsUp…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the main change: CLI output that claimed an effective state when Codex refused a desktop settings change. The raw summary shows the change in src/cli/system-command.ts makes settingsUpdateLines report stored values and omit the effective claim and retry instruction for injection_refused. The title is specific, accurate, and matches the PR objectives. It is 70 characters and 11 words, which is within a reasonable length for a title.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
all PR quality gates passed; the review readiness checklist is complete.
Review readiness checklist
✅ Required local validation passed; commands, results, and any full-suite exception are documented.
✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
✅ I resolved all correct Codex and CodeRabbit findings.
✅ My PR is ready for review.
✅ 4/4 boxes ticked.
This pull request has been marked Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers notified: @lidge-jun@Ingwannu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ocx system settings --client-compaction oncan save the preference while the history preflight refuses to rewrite the Codex config. In that case the CLI printed botheffective onand an instruction to runocx sync, although repeating the same sync hits the same refusal. Reproduced with the provider lock for paginated conversations on Codex 0.166+.Report the stored value and the refusal detail. Omit the effective claim and retry instruction for
injection_refused. The API response, exit status, history guard and retry advice for write-lock contention are unchanged.Verification
Ran the new CLI regression against the original formatter and observed the contradictory output. With the fix, 158 tests across the CLI settings, settings apply and paginated-history suites passed in an isolated checkout.
Changed-file suite on Bun 1.4.4 (
bun scripts/test.ts --changed=dev): 1,037 passed, 1 platform-specific skip, 0 failures.On v2.100.5, ran the two paginated-history suites with a disposable home (17 passed), including refusal without mutating existing conversations or config.
bun check --no-script --noEmitpassed.git diff --checkpassed. Full cross-platform suite not run locally for this CLI-only change.Head 763ac93 review check: CodeRabbit reported no actionable comments. GitHub reported zero review threads and zero submitted reviews. The CLI diff was checked against the server refusal reason and the saved-setting regression. Maintainer approval is pending.
Checklist
Summary by CodeRabbit
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.