Repository navigation
Use UserPromptSubmit for Codex graph reminders - #614
Conversation
|
Hi, _remove_graphify_codex_hooks() removes any Codex hook whose stringified JSON contains "graphify", which can delete unrelated user hooks that merely mention graphify. It also replaces a non-dict "hooks" value with an empty dict, potentially discarding user configuration when hooks.json is malformed but still recoverable. Severity: remediation recommended | Category: correctness How to fix: Match hooks structurally Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
70ca9fd to
18d697a
Compare
Summary
PreToolUsetoUserPromptSubmitPreToolUsehooks during install/uninstall while preserving unrelated hooksWhy
Codex rejects
additionalContextfromPreToolUsehooks, which caused the failure reported in #533.For Graphify's graph reminder,
UserPromptSubmitis also a better fit thanPreToolUse: the assistant should see theGRAPH_REPORT.mdreminder before it decides whether to search files, not after it has already selected a tool.Tests
python -m py_compile graphify/__main__.py tests/test_install.py tests/test_claude_md.pyuv run --with pytest pytest tests/ -q --tb=short(443 passed)Addresses #533.