fix(codex): replace global guidance with an activation pointer - #1739
fix(codex): replace global guidance with an activation pointer#1739astandrik wants to merge 3 commits into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Codex installer behavior so it no longer writes Codebase Memory guidance into the global $CODEX_HOME/AGENTS.md, and instead migrates existing installations by removing only the legacy codebase-memory-mcp managed block while preserving all other user-owned bytes.
Changes:
- Stop creating/planning a new Codex global
AGENTS.mdduring install; add conditional legacy cleanup reporting viacleanup_actions_planned. - Add Codex legacy-instructions cleanup flow (plan/dry-run/mutate) and serialize cleanup actions in the install-plan JSON receipt.
- Extend tests and the smoke test to verify fresh installs don’t create
AGENTS.md, while legacy block cleanup is safe, idempotent, and non-mutating in plan/dry-run modes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_cli.c | Adds plan JSON assertions for cleanup actions and new Codex lifecycle coverage (fresh/no-AGENTS + migration + malformed preservation). |
| src/cli/cli.c | Stops planning/installing Codex instruction file, adds legacy cleanup recording + JSON receipt support for cleanup actions. |
| scripts/smoke-test.sh | Updates Codex smoke coverage to assert no fresh AGENTS.md and validate plan/dry-run/migration/reinstall/uninstall behavior in an isolated HOME. |
| README.md | Updates Codex documentation to reflect that install no longer creates global AGENTS.md and describes the migration behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ac5e3d2 to
c0580ba
Compare
c0580ba to
00c584f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Codex hook preflight failures currently skip the independent legacy guidance cleanup.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
|
Thank you for the careful exact-owned cleanup and preservation cases. I checked current main: Codex installation still writes the full managed guidance block to $CODEX_HOME/AGENTS.md, so the duplication and migration premise is grounded. The proposed zero-guidance end state does not match the project direction already chosen for #1689. We want the global file to retain only a tiny activation pointer, with all detailed behavior owned by the skill. Please revise the fresh-install path to write that pointer, migrate the legacy full block to the pointer while preserving foreign content, and remove only the exact-owned pointer on uninstall. The README, plan and dry-run receipts, and tests should describe that same end state. I have labeled this as a Codex UX and installer-security item. This is a targeted policy adjustment, not a rejection of the cleanup work. Our review queue is full, so detailed review may take a little time. Thank you for covering malformed, unowned, marker-only, repeat-install, and uninstall behavior. |
There was a problem hiding this comment.
🟡 Changes recommended
The implementation directly contradicts linked issue #1689, which explicitly requires eliminating the global Codex instruction write.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
2c4de51 to
2a2e817
Compare
|
Before you spend any time on those 24 red checks — they are not yours. The failure: Your PR touches Nothing is being asked of you here. Once Separately: thank you for turning the activation-pointer revision around so quickly after the 24 August note. The revised description reads as exactly the end state that was asked for — pointer on fresh install, legacy block migrated with foreign content preserved, exact-owned removal on uninstall. That review is queued and is not blocked by any of this. One heads-up for when it does get reviewed, so it is not a surprise: #1781 lands in the same four files and also introduces |
|
The duplicate members are gone from I have deliberately not touched this branch, because you pushed the activation-pointer revision shortly before all this and I would rather not update a branch out from under someone who is mid-change. Rebase or update the branch whenever suits you and CI should give you a real verdict this time. Thanks for your patience with a red wall that had nothing to do with your work. |
Signed-off-by: astandrik <astandrik@yandex-team.ru>
Signed-off-by: astandrik <astandrik@yandex-team.ru>
2a2e817 to
4c1b234
Compare
What does this PR do?
For Codex, this replaces the full managed guidance in global
$CODEX_HOME/AGENTS.mdwith a small activation pointer. The detailedinstructions remain in the installed
codebase-memoryskill.The installer now:
codebase-memory-mcpblock with the pointer while preservingcontent outside the managed markers;
config cannot leave the legacy guidance active;
AGENTS.mdininstruction_files_planned, while plan and dry-run modesremain non-mutating;
Malformed or unsafe managed markers still fail closed. MCP configuration, the
skill, read-only profiles, and lifecycle hooks keep their existing behavior.
Closes #1689.
Verification
Verified on Linux against the exact patch published in
2c4de516b1e7d7f7b20894917f6a321f038ac8a4:CBM_SKIP_PERF=1passed;scripts/smoke-local.shpassed;make -f Makefile.cbm securitypassed, including network egress, fuzz 32/32,and vendored integrity checks.
Checklist
git commit -s) as required by theDCO and CONTRIBUTING.md.