Skip to content

[AI-70] docs: document Codex hook installation - #61

Merged
alexeyzimarev merged 2 commits into
mainfrom
docs/ai-70-codex-hooks
May 13, 2026
Merged

alexeyzimarev merged 2 commits into
mainfrom
docs/ai-70-codex-hooks

Conversation

@alexeyzimarev

Copy link
Copy Markdown
Member

Summary

Documents the Codex hook surface shipped in PR #55 (AI-70). kapacitor setup only installs the Claude Code plugin, so Codex users had no in-README path to discovering kapacitor plugin install --codex.

  • Adds a short Also using Codex CLI? subsection right after the setup step, covering:
    • kapacitor plugin install --codex (user-wide, writes ~/.codex/hooks.json)
    • --project variant (<repo>/.codex/hooks.json)
    • kapacitor plugin remove --codex
    • That kapacitor status reports both hook surfaces.
  • Light update to the What it records intro line to acknowledge that Codex CLI sessions are captured too when those hooks are installed.

Deliberately scoped:

  • kapacitor codex-hook is the internal dispatcher (only invoked from hooks.json), so it isn't documented as a user-facing command.
  • The top-of-README tagline still says "Claude Code sessions" — leaving that rephrase for a separate marketing pass.

Test plan

  • git diff main reviewed — only README.md, only the Codex additions.
  • Render check on GitHub (subsection nests correctly under "Run setup").

🤖 Generated with Claude Code

Aligns README with PR #55 (AI-70). Setup is Claude-only, so Codex
users have no in-README path to discovery. Adds a short subsection
under setup covering kapacitor plugin install --codex (user-wide
and --project), the corresponding remove command, and that
kapacitor status reports both hook surfaces. Updates the
"What it records" line to acknowledge Codex sessions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@linear

linear Bot commented May 13, 2026

Copy link
Copy Markdown

AI-70

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Document Codex hook installation in README

📝 Documentation

Grey Divider

Walkthroughs

Description
• Documents Codex CLI hook installation process
• Adds subsection covering kapacitor plugin install --codex variants
• Updates "What it records" to mention Codex CLI sessions
• Clarifies both user-wide and project-specific hook installation paths
Diagram
flowchart LR
  A["Setup Documentation"] --> B["Claude Code Hooks"]
  A --> C["Codex CLI Hooks"]
  C --> D["User-wide Installation"]
  C --> E["Project-specific Installation"]
  D --> F["kapacitor status Reports Both"]
  E --> F
Loading

Grey Divider

File Changes

1. README.md 📝 Documentation +13/-1

Add Codex hook installation documentation

• Adds new "Also using Codex CLI?" subsection after setup instructions
• Documents kapacitor plugin install --codex for user-wide hook installation
• Documents --project variant for repository-specific hook installation
• Documents kapacitor plugin remove --codex uninstall command
• Updates "What it records" section to acknowledge Codex CLI session capture

README.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 13, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Status misses project installs ✓ Resolved 🐞 Bug ≡ Correctness
Description
README says kapacitor status can verify Claude+Codex hook installation, but the implementation
only checks user-wide locations, so --project installs will be reported as not installed. This
creates false negatives for the exact workflow the new section documents.
Code

README.md[60]

+`kapacitor status` reports installation state for both the Claude Code and Codex hook surfaces, so you can verify each is wired up.
Evidence
The README explicitly recommends using kapacitor status to verify hook wiring, but StatusCommand
hard-codes checks to user paths only, while PluginCommand supports --project installs by writing
to repo-local paths—so status will misreport project installs as missing.

README.md[50-60]
src/kapacitor/Commands/StatusCommand.cs[46-56]
src/kapacitor/Commands/PluginCommand.cs[60-66]
src/kapacitor/Commands/PluginCommand.cs[128-134]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The README claims `kapacitor status` can be used to verify both Claude Code and Codex hook surfaces, but `kapacitor status` only checks **user-wide** hook/plugin locations. As a result, users who follow the documented `--project` installation path will see `Claude ✗` / `Codex ✗` even though hooks are installed for the repo.

## Issue Context
- Claude project install writes to `<repo>/.claude/settings.local.json`.
- Codex project install writes to `<repo>/.codex/hooks.json`.
- `kapacitor status` checks only `ClaudePaths.UserSettings` and `CodexPaths.UserHooksJson` (both user-wide).

## Fix Focus Areas
- README.md[50-60]

## Suggested change
Update the `kapacitor status` sentence to explicitly state it reports **user-wide** install state, and add a short note for project installs (e.g., “for `--project`, verify the repo’s `.claude/settings.local.json` / `.codex/hooks.json` exists or contains the kapacitor entries”).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Missing Codex trust note 🐞 Bug ⚙ Maintainability
Description
README documents kapacitor plugin install --codex --project but omits that Codex requires trusting
the project’s .codex directory before hooks will run. Without this, users can install successfully
yet still capture no sessions.
Code

README.md[R55-57]

+kapacitor plugin install --codex            # user-wide  (~/.codex/hooks.json)
+kapacitor plugin install --codex --project  # this repo only (<repo>/.codex/hooks.json)
+kapacitor plugin remove --codex             # uninstall
Evidence
The README instructs users to install project-scoped Codex hooks, but the CLI indicates an
additional trust step is required specifically for project installs; omitting it can lead to
installs that appear non-functional.

README.md[54-58]
src/kapacitor/Commands/PluginCommand.cs[143-148]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
When installing Codex hooks in project scope, Codex requires the repository’s `.codex` directory to be trusted; otherwise hooks may not execute. The README currently describes the `--project` install path but doesn’t mention this prerequisite.

## Issue Context
The CLI itself prints a note about this trust requirement when `--project` is used.

## Fix Focus Areas
- README.md[54-58]

## Suggested change
Add one bullet/sentence under the `--project` command explaining that Codex will prompt to trust the `.codex` directory, and users should run `codex` once in the repo and accept the trust prompt for hooks to activate.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread README.md Outdated
@alexeyzimarev alexeyzimarev mentioned this pull request May 13, 2026
1 of 3 tasks
Addresses Qodo review findings on #61:

- kapacitor status only checks user-wide hook locations
  (ClaudePaths.UserSettings, CodexPaths.UserHooksJson), so --project
  installs report as not installed. README now says so and tells
  users to inspect the repo's .claude/settings.local.json or
  .codex/hooks.json directly.
- Codex --project installs need the .codex directory trusted before
  hooks run. PluginCommand.InstallCodex itself prints this note;
  the README now mirrors it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexeyzimarev
alexeyzimarev merged commit 1e537de into main May 13, 2026
4 checks passed
@alexeyzimarev
alexeyzimarev deleted the docs/ai-70-codex-hooks branch May 13, 2026 14:06
alexeyzimarev added a commit that referenced this pull request May 13, 2026
User-facing CLI changes (new commands, flags, behavior shifts) have
repeatedly landed without touching README.md, requiring follow-up
doc-only PRs (#60 for AI-613 history scope flags, #61 for AI-70
Codex hook surface). Adds a "Common mistakes to avoid" bullet
calling this out, naming the two README sections that typically
need updating, and pointing out that help-*.txt resources aren't a
substitute for the public README.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant