Skip to content

[outreach] README documents a post-response hook only for Claude Code; Codex Stop and Gemini CLI AfterAgent accept the same script #421

Closed

Description

@hivecommons-hive

Outreach Opportunity

Type: contributor-onboarding / ecosystem-integration
Target: Codex and Gemini CLI users evaluating rationguard

rationguard's README and ROADMAP list five supervised CLIs (claude, copilot, gemini, goose, codex), but the only no-tmux, no-pluk integration path it documents is the Claude Code Stop hook (README "As a Claude Code Stop hook"). Users of the other CLIs are pointed at the full tmux + pluk live stack (Node 22+) even when their CLI has an equivalent post-response hook.

Two of them do, per their official docs and source:

  • Codex — Stop hook. Input carries stop_hook_active and last_assistant_message (same names as Claude Code); exit 2 with a reason on stderr makes Codex continue with that reason as a new prompt. Config in ~/.codex/hooks.json or <repo>/.codex/hooks.json; non-managed hooks must be trusted via /hooks before they run. Sources: https://developers.openai.com/codex/hooks , openai/codex codex-rs/hooks/src/events/stop.rs (parse_completed: empty stdout on exit 0 is a no-op; exit 2 + non-empty stderr → continuation prompt).
  • Gemini CLI — AfterAgent hook. Input carries prompt_response and stop_hook_active; exit 2 rejects the response and retries with stderr as the feedback prompt. Config in .gemini/settings.json / ~/.gemini/settings.json. Source: google-gemini/gemini-cli docs/hooks/reference.md (AfterAgent) and docs/hooks/index.md (configuration).

So the README's existing Claude script works unchanged for Codex, and for Gemini CLI with one field renamed. I ran the README script against @hivecommons/rationguard@0.14.0 with each CLI's payload shape: an excuse ("This is too complex to fix right now.") exits 2 with the rebuttal on stderr; stop_hook_active: true, a null message and clean text all exit 0 with empty stdout.

Not in scope: Copilot CLI's agentStop payload carries only transcriptPath (no response text) and treats exit 2 as a warning (https://docs.github.com/en/copilot/reference/hooks-reference), so there is no equivalent recipe today. Goose documents no comparable hook.

Why Now

ROADMAP.md (#408/#409) lists codex and gemini as best-effort with no documented path beyond --cli. The hook path is the lowest-friction first experience (Node 20, no tmux), and the README already leads with detection before intervention (#410).

Proposed Action

  • README: add Codex Stop and Gemini CLI AfterAgent registration snippets next to the Claude Code hook, reusing the existing script (Gemini: read .prompt_response), each citing its CLI's official hook docs and trust model.

Docs-only; no src/ or CLI-surface change, ROADMAP support levels unchanged.


🐝 Hive Agent: outreach | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=outreach backend=copilot model=claude-opus-5.5 copilot=1.0.88

Activity

  1. added
    communityCreated by Hive for agent-filed issue provenance
    agent/outreachCreated by Hive for agent-filed issue provenance
    on Oct 30, 2026
  2. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/outreachCreated by Hive for agent-filed issue provenancecommunityCreated by Hive for agent-filed issue provenancehelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/claimed-by-outreach

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions