Skip to content

fix: Make 'wizard clear' parse agent configs and harden deletion safety#1

Merged
uptodatelabs merged 1 commit into
uptodatelabs:mainfrom
urmispring:main
Jul 24, 2026
Merged

fix: Make 'wizard clear' parse agent configs and harden deletion safety#1
uptodatelabs merged 1 commit into
uptodatelabs:mainfrom
urmispring:main

Conversation

@urmispring

Copy link
Copy Markdown

Summary

  • wizard clear now parses each AI agent's config (Claude Code, Hermes, Cursor, Codex, ...) via agent_parser.get_all_indexed_projects() to discover CodeNexus-wired projects, instead of only scanning ~/ .codenexus and home subdirs.
  • Only lists projects that actually have an index on disk (find_codenexus_index).
  • Hardened deletion safety: unique idx-N ids, --dry-run flag, and path-based confirmation (must type the exact project directory name to delete), preventing accidental removal of a real index.

Root cause

The previous wizard clear never imported agent_parser and simply globbed ~/ .codenexus, ./.codenexus, and one level of home subdirs. It ignored the already-built agent config parsers, so it could miss agent-wired projects or delete the wrong thing.

Verification

  • pytest tests/ still passes (12/12).
  • Confirmed via mocked runs: dry-run removes nothing, wrong confirmation token cancels, correct token deletes only the targeted dummy index; real project indexes preserved.

🤖 Generated with Claude Code

- Route through agent_parser.get_all_indexed_projects() to discover CodeNexus-wired projects (Claude Code, Hermes, Cursor, Codex, ...)

- Only list projects that have a real index on disk via find_codenexus_index

- Add unique idx-N ids, --dry-run flag, and path-based confirmation to prevent accidental index deletion
@uptodatelabs
uptodatelabs merged commit 81de45a into uptodatelabs:main Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants