Write Codex a skill, not a prompt it stopped reading - #8
Conversation
Reported: the engram slash command appears in OpenClaude and Opencode but not
Codex. The cause is a defect in engram, not the user's configuration.
Codex 0.149 removed `~/.codex/prompts/` entirely. The shipped binary contains
no `prompts` string at all; the feature moved to skills, discovered as
`<skills-root>/<name>/SKILL.md`. Engram had been writing three prompt files
into that directory for a release and nothing ever loaded them — the harness
table had drifted from the harness.
Codex's skills root is `~/.codex/skills`, which needs no marketplace entry, no
`config.toml` registration, and no `codex plugin add`. That is why it is the
right target: the alternative route (a personal plugin plus an entry in
`~/.agents/plugins/marketplace.json` plus an install entry in `config.toml`)
would mean mutating two config files engram does not own, which only `--hooks`
is allowed to do, opt-in and with a backup.
`CommandSurface::Skill { dir }` is a new variant rather than a reuse of
`Plugin { dir }`: a plugin wraps its skills in a directory with a manifest,
a bare skills root does not, and collapsing the two would have written Codex a
manifest it has no use for.
Engram never deletes, so the stale `~/.codex/prompts/engram-*.md` files stay
where they are; the CHANGELOG says they can be removed by hand.
Gates: fmt, clippy -D warnings, 255 tests, REUSE 3.3, makeinfo clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016i16R4GhdSffsboRYq97Fs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c69ba7baf
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| let body = match spec.command_surface { | ||
| CommandSurface::Plugin { .. } => { | ||
| CommandSurface::Plugin { .. } | CommandSurface::Skill { .. } => { |
There was a problem hiding this comment.
Quote descriptions before emitting Codex skill YAML
When installing engram-save-chat for Codex, this new arm routes the template through render_skill, which emits its description without YAML escaping. That template contains description: Save this conversation: capture ...; the colon followed by a space makes the generated SKILL.md invalid YAML, so Codex cannot load the primary save-chat skill. Serialize or quote the description rather than interpolating it as a plain scalar.
AGENTS.md reference: AGENTS.md:L274-L275
Useful? React with 👍 / 👎.
| command_surface: CommandSurface::Skill { | ||
| dir: ".codex/skills", |
There was a problem hiding this comment.
Update the bundled install guide for the skill migration
This switch leaves plugins/engram/README.md lines 32–47 directing Codex users to ~/.codex/prompts/ and explicitly stating that engram never ships skills because skill directories are unwritable. Those instructions are now the opposite of the installer behavior and will mislead users following the source-tree installation and Nix guidance; update that guide alongside the path change.
Useful? React with 👍 / 👎.
Reported: the engram slash command shows up in OpenClaude and Opencode, but not Codex. The cause is a defect in engram, not a configuration problem.
What happened
Codex 0.149 removed
~/.codex/prompts/entirely. The shipped binary contains nopromptsstring at all:The feature moved to skills, discovered as
<skills-root>/<name>/SKILL.md. Engram had been writing three prompt files into that directory for a release, and nothing ever loaded them — the harness table had drifted from the harness.Why
~/.codex/skills, and not a pluginCodex has two extension routes, and only one is appropriate here:
~/.codex/skills/<name>/SKILL.md~/.agents/plugins/marketplace.jsonand an entry inconfig.tomlOnly
--hooksis allowed to touch a config engram doesn't own, and only opt-in and with a backup. Writing a marketplace entry and an install record just to deliver three commands would break that posture.CommandSurface::Skillis a new variantNot a reuse of
Plugin { dir }. A plugin wraps its skills in a directory with a manifest; a bare skills root does not. Collapsing them would have written Codex aplugin.jsonit has no use for.The skill body and its
name/descriptionfrontmatter come from the same shared template as the command files, so the surfaces cannot disagree about what a command does.Note on this machine
~/.codex/skillshere is a symlink chain into the Nix store (→ ~/.agents/skills → ~/.local/state/construct/current → /nix/store/…), so the existingis_nix_managedwarning fires and engram declines to write rather than failing. That is the correct behaviour for a declaratively-managed skills root — the skills belong in that bundle, not written underneath it at runtime.Engram never deletes, so the stale
~/.codex/prompts/engram-*.mdfiles stay put; the CHANGELOG notes they can be removed by hand.Gates
fmt·clippy -D warnings· 255 tests · REUSE 3.3 ·makeinfoclean🤖 Generated with Claude Code
https://claude.ai/code/session_016i16R4GhdSffsboRYq97Fs