[noskills] Codex integration throws EEXIST error if .codex directory already exists
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- node.js, typescript
- Domain
- cli
Research direction
Start at the noskills init entry point and trace the Codex CLI selection to the .codex directory creation shown in the error. Reproduce with an existing .codex directory, then verify initialization completes without an unhandled EEXIST error and that the existing directory is preserved or handled with a friendly message.
Written by the indexing model from the issue text.
Description
Bug Description
When initializing a project using the noskills init command, the process crashes with an EEXIST error if a .codex directory already exists in the project root.
This occurs after selecting "Codex CLI" in the tools selection step. It appears the CLI attempts to create the .codex directory using mkdir without first checking if the directory is already present, causing the initialization to fail.
Steps to Reproduce
- Ensure a
.codexfolder already exists in your target project directory. - Run
npx eser@latest noskills init - When prompted for "Any additional tools?", select
Codex CLI. - Proceed through the remaining prompts (e.g., project kind).
- See the
EEXISTerror crash the process.
Error Output:
node:internal/fs/promises:859
return await PromisePrototypeThen(
^
Error: EEXIST: file already exists, mkdir '/Users/ssi/projects/rswy/web/.codex'
at async Module.mkdir (node:internal/fs/promises:859:10)
at async Object.mkdir (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/chunk-TW23CULJ.js:2:1187)
at async Object.syncHooks (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/chunk-4JICYXYK.js:102:342)
at async wt (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/chunk-4JICYXYK.js:111:1175)
at async Module.qe (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/init-4Q4HAHND.js:2:4759)
at async #F (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/chunk-RNFCAHVL.js:89:34)
at async t.parse (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/chunks/chunk-RNFCAHVL.js:88:2108)
at async h (file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/eser.js:3:13094)
at async file:///Users/ssi/.npm/_npx/4c89fca78fe8d356/node_modules/eser/eser.js:3:13137 {
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path: '/Users/ssi/projects/rswy/web/.codex'
}
Expected Behavior
The initialization process should gracefully handle the scenario where the .codex directory already exists. It should either bypass the directory creation step and utilize the existing folder, or output a friendly warning/prompt to the user, rather than throwing an unhandled exception and crashing the entire setup.
Actual Behavior
The initialization process crashes completely with an unhandled EEXIST error (Error: EEXIST: file already exists, mkdir...) when it attempts to create the .codex directory without verifying if it is already present in the file system.
Runtime
Node.js
Package Version
latest
Runtime Version
v24.15.0
Additional Context
No response
- Dominant language
- TypeScript
- Stars
- 128
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eser/stack
-
bug triage
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
-
bug
-
Easier DI Access Open
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100