Skip to content

fix(claude-desktop): explain pre-apply gateway state - #602

Open
luvs01 wants to merge 1 commit into
devfrom
codex/propose-fix-for-explanation-bug
Open

luvs01 wants to merge 1 commit into
devfrom
codex/propose-fix-for-explanation-bug

Conversation

@luvs01

@luvs01 luvs01 commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The CLI could misattribute a gateway preference to a machine when that gateway marker had just been written by the current apply invocation, producing misleading advice to run ocx claude desktop apply --first-party on a fresh fallback.

Description

  • Capture a pre-apply configuration snapshot with const preApplyConfig = loadConfig() and use it for parsing and mode explanation so post-apply writes do not alter the reasoning presented to the user.
  • Pass preApplyConfig into parseDesktopApplyArgs and into gatewayModeExplanation instead of reloading the config after the apply.
  • Add a CLI-level regression assertion in tests/claude-integration/claude-desktop-cli.test.ts that disables the intercept and verifies the implicit gateway fallback does not recommend --first-party.

Testing

  • Ran bun run typecheck which completed successfully without type errors.
  • Ran repository checks (git diff --check) and ensured the working tree is clean after the change.
  • Attempted focused tests with bun test tests/claude-integration/claude-desktop-mode-explanation.test.ts tests/claude-integration/claude-desktop-cli.test.ts, but the test run could not load due to the container's Bun 1.2.14 missing the node:zlib zstdDecompressSync export, so the tests did not execute in this environment.

Codex Task


Devin Review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: luvs01/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c2b743f3-9738-47ed-8a4d-5d0395af329d


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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T02:37:59.037120Z 7597bce PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant