Skip to content

Codex prompts generated by OpenSpec do not inject arguments ($ARGUMENTS missing) #649

@zxfxpower

Description

@zxfxpower

Summary:
OpenSpec generates Codex prompts in ~/.codex/prompts/opsx-*.md without $ARGUMENTS (or $1..$9) placeholders. As a result, when invoking /prompts:opsx-ff <description> in Codex, the input is not visible to the prompt, and the skill
asks the user to describe the change again.

Steps to reproduce:

  1. Install OpenSpec v1.1.1 and run openspec init --tools codex or openspec update.
  2. Check ~/.codex/prompts/opsx-ff.md — note there is no $ARGUMENTS in the body.
  3. In Codex, run: /prompts:opsx-ff add a new action "partitioned storage" on the device list page
  4. The prompt asks “Please describe what change you want to build or fix,” ignoring the provided argument.

Expected:
Prompt should receive and use the arguments (via $ARGUMENTS or $1..$9), so it does not ask for the change again.

Actual:
Arguments are not injected; prompt behaves as if no input was provided.

Environment:

  • OpenSpec: v1.1.1
  • Codex CLI: v0.93.0
  • OS: macOS (Apple Silicon)

Additional context:

  • In pre‑1.0 versions, the Codex prompt openspec-proposal.md already included $ARGUMENTS, so arguments were injected correctly. This suggests a regression after the migration to opsx prompts.

Suggested fix:
Add $ARGUMENTS (or $1..$9) to the Codex prompt template, e.g. in src/core/command-generation/adapters/codex.ts or in the opsx prompt bodies, so arguments are passed through. Codex docs confirm $ARGUMENTS is supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions