Skip to content

fix(ce-setup): detect leftover Codex tool-map sentinels - #1570

Closed
saurabhkagent-lab wants to merge 9 commits into
EveryInc:mainfrom
saurabhkagent-lab:fix/ce-setup-detect-legacy-codex-tool-map
Closed

fix(ce-setup): detect leftover Codex tool-map sentinels#1570
saurabhkagent-lab wants to merge 9 commits into
EveryInc:mainfrom
saurabhkagent-lab:fix/ce-setup-detect-legacy-codex-tool-map

Conversation

@saurabhkagent-lab

Copy link
Copy Markdown

Summary

ce-setup reported a healthy Codex environment even when the retired <!-- BEGIN COMPOUND CODEX TOOL MAP --> block remained in $CODEX_HOME/AGENTS.md. That mapping is known to make Codex skip ce-code-review.

check-health now scans $CODEX_HOME/AGENTS.md and profile copies for both sentinels and points at docs/install/upgrading.md. Out of scope: changing ce-work skip phrases or auto-stripping the file.

Validation

  • bun test tests/skills/ce-setup-check-health.test.ts — 57 pass
  • bun run release:validate — in sync

Closes #1559

Security Disclosure

No security-relevant changes. The check only reads AGENTS.md for exact sentinels.

Agent Disclosure

  • Model: Hermes Agent · grok-4.6

Native Codex install no longer needs the Bun-era AGENTS.md tool map,
but ce-setup still reported healthy when the block remained and Codex
could skip ce-code-review.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a630c109f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Comment thread tests/skills/ce-setup-check-health.test.ts
Isolate CODEX_HOME in check-health fixtures so host installs cannot hide
or fake the leftover tool-map warning.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fc537d338

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Named-profile copies under ~/.codex/profiles are still scanned. The
default root AGENTS.md is not the current session.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 79b222fd37

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Marketplace installs do not include docs/install/upgrading.md. Point the
health warning at a skill-local reference instead.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46d051f92f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Independent grep treated END-then-BEGIN as a removable map even though
removeCodexAgentsToolMapBlock would leave the file unchanged. Warn only
when the first BEGIN precedes its END.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aef3b3910d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Platform-variable convention requires ${CODEX_HOME:-...}; bare
$CODEX_HOME failed skill-conventions CI.
First-occurrence END hid a removable BEGIN/END block later in the file.
Warn and strip from the first BEGIN through the next END after it.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63105ee315

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/scripts/check-health Outdated
Substring search treated inline documentation of both markers as a
removable block. Warn and strip only when each sentinel is its own line.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d03f74236

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread skills/ce-setup/references/legacy-codex-tool-map.md
The upgrade paste still told agents to delete whenever both marker
strings occurred. Match the skill-local guide: standalone lines and a
BEGIN with a later END.
@tmchow

tmchow commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this — the gap is real and I reproduced it. check-health never looks at $CODEX_HOME/AGENTS.md, and since ca47442 only strips the block when someone re-runs the Bun CLI, anyone who moved to the native marketplace install keeps it forever with nothing telling them. Good catch.

I'm closing this rather than asking for another round, and I want to be straight about why.

The detection condition here is one thing: a standalone BEGIN line followed by a standalone END line. Over seven review rounds it became 58 added lines in check-health — stray END before BEGIN, markers inline in prose, END/BEGIN/END — plus a semantics change to removeCodexAgentsToolMapBlock and a step in the upgrade doc that went from one sentence to six. Each round was a reasonable answer to the finding in front of you. Together they're the accretion loop AGENTS.md describes under "Acting on review feedback": a case the stated condition already decides isn't a finding, and on the second round against the same block you restate it instead of qualifying it. That's on our review setup as much as anything — the bot is very good at generating valid-looking hypotheticals against natural-language rules, and it'll keep doing it indefinitely.

Three things I'd have had to change regardless of size:

One more thing worth separating: this doesn't close #1559. The failure that issue actually reports lives in ce-work, which emitted Code review: skipped (ce-code-review unavailable) for a reason that isn't in that gate's condition list (skills/ce-work/references/shipping-workflow.md:41). Detection doesn't touch it. I'm leaving the issue open for that half.

Replacement PR is coming — same premise, the condition instead of the cases, and your CODEX_HOME fixture isolation kept, because that one was a genuine bug in the tests. I'll link it here.

@tmchow

tmchow commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Replacement is up: #1577.

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.

ce-setup misses legacy Codex tool map that can cause false ce-code-review unavailable skips

2 participants