Skip to content

Codex start coding instead of following spec-kit prompts. #4715

Closed

Description

@Hotion13

What version of Codex is running?

codex-cli 0.44.0

Which model were you using?

gpt-5 medium

What platform is your computer?

Ubuntu WSL on windows

What steps can reproduce the bug?

Create a new spec kit projet :

david@DAVID-PC:~/dev$ specify init --ai codex --script sh projectTestWithCodex david@DAVID-PC:~/dev$ cd projectTestWithCodex/ david@DAVID-PC:~/dev/projectTestWithCodex$ CODEX_HOME=/home/david/dev/projectTestWithCodex/.codex

One created, ask a /constitution for a new app :

› /constitution A single web app to help us choose your evening meal. That was a single page app. Every participan will choose in a list meal they can it, then a random choose will be done in commom elements to every participants

Rightafter, codex start to write line of code (HTML, CSS...) instead of following spec kit prompts ans kits.

What is the expected behavior?

I used my claude-code to have a comparison point.

`> /constitution is running… App will require user to login with a simple pin code to change his preference

● I'll update the project constitution by adding a new security principle regarding PIN-based authentication for
preference changes. Let me first read the existing constitution.

● Read(.specify/memory/constitution.md)
⎿  Read 202 lines (ctrl+o to expand)

● Now I'll read the dependent templates to ensure consistency after the update:

● Read(.specify/templates/plan-template.md)
⎿  Read 220 lines (ctrl+o to expand)

● Read(.specify/templates/spec-template.md)
⎿  Read 117 lines (ctrl+o to expand)

● Read(.specify/templates/tasks-template.md)
⎿  Read 127 lines (ctrl+o to expand)

● Read(CLAUDE.md)
⎿  Read 391 lines (ctrl+o to expand)

● Now I'll update the constitution with the new PIN authentication security principle. This is a MINOR version bump
(1.3.0 → 1.4.0) because we're adding a new security requirement that expands on existing principles.

● Write(.specify/memory/constitution.md)
⎿  Updated .specify/memory/constitution.md with 16 additions and 10 removals
1
15
...
19
20 ## Clarifications
21
22 + ### Session 2025-10-04
23 + - Q: Comment les utilisateurs s'authentifient-ils pour modifier leurs préférences ? → A: Code PIN simple
+ par utilisateur
24 +
25 ### Session 2025-10-03
26 - Q: Quelle base de données sera utilisée ? → A: SQLite
27 - Q: Quelles mesures de sécurité Django obligatoires ? → A: Standard Django (CSRF, XSS, SQL injection)
...
136 - DEBUG = False in production
137 - Strong SECRET_KEY via environment variable
138 - Secure password hashing (Django's PBKDF2)
139 + - PIN Authentication: Each user MUST authenticate with a simple PIN code to modify their
+ preferences
140 + - PIN stored using Django's password hashing (PBKDF2)
141 + - PIN entry required before any preference change operation
142 + - Session timeout after period of inactivity
143 + - No complex password requirements (simplicity for meal planning use case)
144
145 - Rationale: Django provides battle-tested security out of the box. For a meal planning app, standard
- Django protections are sufficient.
- Additional measures (HTTPS, rate limiting) can be added when deployment requirements are clear.
145 + Rationale: Django provides battle-tested security out of the box. For a meal planning app, standard
+ Django protections are sufficient.
+ PIN authentication balances security with usability - users need to protect their preferences without
+ the friction of complex passwords.
+ Additional measures (HTTPS, rate limiting) can be added when deployment requirements are clear.
146
147 ## Development Workflow
148
...
198 - Use .specify/templates/ for development workflow guidance
199 - Agent-specific context files (e.g., CLAUDE.md) updated incrementally per plan template
200
201 - Version: 1.3.0 | Ratified: 2025-10-03 | Last Amended: 2025-10-03
201 + Version: 1.4.0 | Ratified: 2025-10-03 | Last Amended: 2025-10-04

● Now I need to update the CLAUDE.md file to reflect the new PIN authentication requirement:

● Update(CLAUDE.md)
⎿  Updated CLAUDE.md with 2 additions and 2 removals
1 # Configuration Claude Code - OnMangeQuoi
2
3 Projet : OnMangeQuoi - Application Django de décision de repas
4 - Mise à jour : 2025-10-03
5 - Constitution : v1.3.0
4 + Mise à jour : 2025-10-04
5 + Constitution : v1.4.0
6
7 ## 🎯 Contexte du projet
8

 Tip: Use # to memorize shortcut to quickly add to CLAUDE.md`

What do you see instead?

`╭────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.44.0) │
│ │
│ model: gpt-5 medium /model to change │
│ directory: ~/dev/projectTestWithCodex │
╰────────────────────────────────────────────╯

To get started, describe a task or try one of these commands:

/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
/review - review any changes and find issues

› /constitution A single web app to help us choose your evening meal. That was a single page app. Every
participan will choose in a list meal they can it, then a random choose will be done in commom elements to
every participants

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• I’m going to scan the repo to see what exists, then scaffold a simple SPA with HTML/CSS/JS to meet your spec.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• Next, I’ll scaffold the SPA files and implement the core selection and random-pick logic.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• All set — I built a small single-page app that lets multiple participants select meals they can eat and then picks a
random meal from the common choices.

Files added

  • index.html:1 — Main UI layout and controls
  • app.js:1 — Participants, per-user meal selections, intersection logic, random picker, localStorage
  • styles.css:1 — Minimal responsive styling

How it works

  • Add participants, click a name to edit their selections.
  • Check meals each participant can eat. Add new meals if needed.
  • The app shows the intersection of meals across all participants. If any participant has no selections, the common set
    is empty.
  • Click Pick Random Meal to choose tonight’s meal from the common set.
  • State persists via localStorage.

Run it

  • Open index.html in your browser (no server required).

Notes

  • You can add/remove participants anytime; selections and meals persist.
  • The intersection is strict: every participant must have at least one overlapping meal.

Want me to add any of these?

  • Export/import of session state
  • Shareable URL encoding the current state
  • A reset button or light/dark theme toggle`

Additional information

No response

Activity

  1. added
    bug
    on Oct 4, 2025
  2. added
    model-behavior
    on Oct 4, 2025
  3. Hotion13 commented on Oct 4, 2025

    @Hotion13
    Author

    OK, found solution.

    In codex CLI, you need to specify your codex home directory.

    Exemple :
    export CODEX_HOME=/home/david/dev/testcodex/.codex

    With this export, codex find successfuly customs commands from spec-kit and use it.
    Downside is : You have to load it, each time you want to use your codex inside your git-spec driven.

    On my Ubuntu WSL i made this :

    Installed dir-env package
    sudo apt install direnv

    Then, added this line on my ~/.bashrc (or zsh) to evaluate direnv in folder if it exists :
    eval "$(direnv hook bash)"

    Then, in my spec-kit driven folder, created a .envrc file with a line like this :
    export CODEX_HOME=/path/to/my/project/.codex

    Then validate use of my file with
    direnv allow

    In the end i have this when i cd into my project folder :

    david@DAVID-PC:/$ cd ~/dev/testcodex/
    direnv: loading ~/dev/testcodex/.envrc
    direnv: export +CODEX_HOME
    

    And if i show content of variable :
    david@DAVID-PC:~/dev/testcodex$ echo $CODEX_HOME /home/david/dev/testcodex/.codex

    And codex runs as expected.

    I close this issue, i eventually open a new for codex looking strait away commands in it's .codex folder inside working dir.
    Now i've found this, it's not blocking anymore.

    Hope i helped some git-spec users.

    David.

  4. robertDouglass commented on Nov 6, 2025

    @robertDouglass

    Awesome! I'll add that to the docs. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmodel-behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions