Skip to content

fix(pstack): finish the move from Claude Code to Codex in configure and doctor - #30

Merged
mstephenholl merged 1 commit into
mainfrom
fix-codex-move
Oct 20, 2026
Merged

mstephenholl merged 1 commit into
mainfrom
fix-codex-move

Conversation

@mstephenholl

Copy link
Copy Markdown
Owner

Why

Moving a Claude Code install of this fork to Codex, as pstack/README.md describes, left Codex with no models of its own and gave no warning:

  • configure kept Claude-only roles. plan() replaces a role with new defaults only when it equals the defaults for the harnesses installed now. A file written for Claude Code holds Claude defaults, which look like custom choices next to Codex's, so configure kept all 17 as "your choice". With foreign seats: off, Codex drops every claude: entry, so every role ran on the session's own model and panels had one model. doctor reported 0 problems.
  • doctor kept saying to install upstream's plugin after it was installed. Both the superseded-install warning and the "claude is installed" note always carried /plugin install pstack@cursor-plugins.

Both turned up while moving a real install today.

What changes

  • harnesses_without_entries() finds installed harnesses that no entry anywhere in the models file can run on. Entries that count: native entries, inherit-parent, and foreign entries that will actually be seated. The test is on the whole file, so a single role someone pinned to one harness on purpose is left alone (test_configure_keeps_your_overrides_and_drops_retired_roles still holds).
  • configure adds that harness's defaults after each kept choice and says so. A role set with --set is left as given.
  • doctor warns no entry in the models file can run in codex, so every role runs on its session model, with pstack configure as the fix.
  • doctor reads enabledPlugins in ~/.claude/settings.json through a new claude_settings(), which the read-rules check now uses too. When pstack@cursor-plugins is enabled, neither note tells you to install it.
  • pstack/README.md: the move steps now say to run pstack configure after pstack install --codex, and why.

Risk

A models file whose entries all point at other harnesses on purpose gains entries for the installed harness on the next configure. Before, those roles ran on the session's model in that harness, so the defaults are a different choice, and they're printed when added.

Proof

  • Two new CLI tests:
    • The move path: install for Claude Code, configure, add Codex, install --codex. doctor warns, configure adds Codex's defaults while keeping the Claude ones, doctor is then quiet, and a second configure leaves the file byte-for-byte the same.
    • The enabled-plugin doctor notes.
  • Both new tests fail on main with the old CLI, each for the reason it targets.
  • On the real install that turned this up, a dry run of this branch's configure keeps each Claude choice and adds codex:gpt-6.1-sol or codex:gpt-6-astra, both models to every panel, and the "added codex's defaults" line.
  • All 254 unit tests and install_test.sh pass, check.py reports 0 problems, and everything compiles.

…nd doctor

A models file written for a Claude Code install names only Claude models.
After `pstack install --codex`, configure kept every role as the user's
choice, because it compares roles with the defaults of the harnesses
installed now, so with foreign seats off every role in Codex ran on the
session's model, and doctor said nothing. When no entry in the file can run
in an installed harness, configure now adds that harness's defaults after
each kept choice, and doctor warns until it does.

doctor also told users to install upstream's plugin even after they had.
It now reads enabledPlugins in ~/.claude/settings.json and drops that step
once pstack@cursor-plugins is enabled.
@mstephenholl
mstephenholl merged commit a5d391a into main Oct 20, 2026
9 checks passed
@mstephenholl
mstephenholl deleted the fix-codex-move branch October 20, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant