Codex prompts generated by OpenSpec do not inject arguments ($ARGUMENTS missing)
Codex prompts generated by OpenSpec do not inject arguments ($ARGUMENTS missing)
Additional analysis (regression evidence):
In pre‑1.0 versions (e.g. v0.23.0), the Codex slash command generator explicitly injected $ARGUMENTS in the prompt frontmatter/body.
Reference:
- v0.23.0:
src/core/configurators/slash/codex.tsgetFrontmatter()returns YAML frontmatter followed by$ARGUMENTSfor proposal/apply/archive- This was required for Codex argument injection and was covered by tests
In v1.0+ (current v1.1.1), the new Codex adapter in src/core/command-generation/adapters/codex.ts only emits frontmatter + body, but does not include $ARGUMENTS. As a result, arguments passed in /prompts:opsx-ff <...> are
not visible to the prompt and it asks for input again.
This appears to be a regression introduced during the migration from legacy slash commands to the new skills/command-generation system.
Additional issue (Codex command hints):
In Codex prompt files (opsx-*.md), the instructions and examples often reference /opsx:apply, /opsx:ff, etc.
However, in Codex the correct invocation format is /prompts:opsx-apply, /prompts:opsx-ff, etc.
This mismatch is confusing and leads to failed command invocation in Codex.
Suggested fix:
- Update Codex prompt templates to use
/prompts:opsx-*in all examples and hints (or render command references via a tool-aware formatter).
Requesting triage / priority: This blocks Codex users from using opsx-ff/opsx-apply with arguments (input ignored). Fix seems small: inject $ARGUMENTS (or $1..$9) into Codex prompt templates (adapters/codex.ts). Happy to test a patch if you have a branch.
Likely not intentional. During the 1.0 migration, the new Codex adapter was introduced without $ARGUMENTS support (#556), and the legacy configurator that did include $ARGUMENTS was later removed in #565. There’s no explicit design note in #565 saying “drop arguments,” and the specs still mention $ARGUMENTS, so this looks like a regression from the migration rather than a deliberate change.
@TabishB hi! Friendly ping on this regression. The args worked pre‑1.0 and appear to have been dropped during the 1.0 adapter migration (#556/#565). I have a fix ready in PR #651 (adds $ARGUMENTS + Codex command reference transform). Appreciate a quick look when you have a chance—happy to adjust if needed.
still missing in version 1.2
@fengyunzaidushi Thanks for confirming this is still missing in v1.2.0. As a temporary workaround, I’m currently not using the generated /prompts:opsx-* commands. I now use OpenSpec skills directly in Codex, and it has been stable for daily use. You may want to try the same approach until this issue is fixed.
I encountered the same problem. /prompts:opsx-ff ->newline add a new action "partitioned storage" on the device list page
Same to me. The args will not be injected into prompts.