Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3e1a9b0fe
ℹ️ 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".
| if !initAir { | ||
| if promptPath, removed, err := cleanupCodexPromptCommands(); err != nil { | ||
| fmt.Printf(" ⚠ Failed to remove deprecated Codex prompts: %v\n", err) | ||
| } else if removed > 0 { | ||
| fmt.Printf(" ✓ Removed %d deprecated Codex prompts (%s)\n", removed, promptPath) |
There was a problem hiding this comment.
Defer prompt cleanup until Codex skills install succeeds
In runInit, deprecated Codex prompts are deleted before calling installCodexSkills, so any filesystem error during skill installation (e.g., failing to create/write ~/.agents/skills) leaves users with neither old prompts nor new skills. This is a regression risk in partial-failure scenarios because the cleanup is destructive while the install path is best-effort with warning-only handling; doing cleanup only after a successful install (or rolling back on failure) avoids breaking existing setups.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4734d101b5
ℹ️ 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".
| if !initAir { | ||
| if promptPath, removed, err := cleanupCodexPromptCommands(); err != nil { |
There was a problem hiding this comment.
Honor --local by skipping global Codex prompt cleanup
When haft init --codex --local runs, this branch still calls cleanupCodexPromptCommands, which hard-deletes Haft prompt files from ~/.codex/prompts. That violates the --local contract (project-only changes) and can unexpectedly break existing global Air/Codex prompt setups in other repos; this cleanup should be gated so local init does not mutate global prompt state.
Useful? React with 👍 / 👎.
Summary
Validation
git diff --checkgo test ./internal/clidraft: false