Skip to content

Fix misleading CLI output when Codex refuses a desktop settings change - #8929

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
auroraflux-jhkim:fix/cli-compaction-refusal-report
Nov 21, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
auroraflux-jhkim:fix/cli-compaction-refusal-report

Conversation

@auroraflux-jhkim

@auroraflux-jhkim auroraflux-jhkim commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

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.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Changes: Settings refusal reporting

Layer / File(s) Summary
Report refused settings applications
src/cli/system-command.ts, tests/cli/cli-headless-parity.test.ts, docs-site/src/content/docs/guides/codex-integration.md
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.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • 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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed 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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4f757e9 and 763ac93.

Files selected for processing: 3

  • docs-site/src/content/docs/guides/codex-integration.md
  • src/cli/system-command.ts
  • tests/cli/cli-headless-parity.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@auroraflux-jhkim
auroraflux-jhkim marked this pull request as ready for review November 19, 2026 00:05
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • 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

Hygiene

✅ Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft November 19, 2026 00:48
@github-actions
github-actions Bot marked this pull request as ready for review November 19, 2026 01:31
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev (per MAINTAINERS.md; maintainer integration, not an independent approval)

  • Exact head: 763ac9389dcc1aef397f888598b37d0d2daedde3
  • Checks on this head: 17 passed, 14 skipped, none pending or failing (Ubuntu PR CI; Windows/macOS are covered by the next dev batch gate).
  • Review threads: none unresolved.
  • Review: gpt-6.1-terra, two rounds, final verdict PASS.
  • Regression: tests/cli/cli-headless-parity.test.ts passes on this head (110 pass) and fails with src/cli/system-command.ts restored from dev (1 fail).

@lidge-jun
lidge-jun merged commit fa0a35a into lidge-jun:dev Nov 21, 2026
44 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants