You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support the CodeGraph UserPromptSubmit hook in Codex CLI #3335
Extend codegraph install --target=codex to offer the same prompt-time CodeGraph context that the Claude Code target offers. Codex CLI now supports UserPromptSubmit. It sends prompt and cwd in the hook stdin JSON and adds plain-text stdout to the model's context.
Current behavior
In CodeGraph v1.6.3, the installer offers the front-load hook only when Claude Code is selected. The Codex target registers the MCP server and adds AGENTS.md guidance. Codex still decides whether to make an MCP call. With the prompt hook registered, a matching structural question can get CodeGraph context before the model picks its first tool.
Compatibility check
On Windows x64 with CodeGraph v1.6.3 and Codex CLI 0.169.0, I passed a Codex-shaped UserPromptSubmit payload directly to the existing hook command:
@{
hook_event_name='UserPromptSubmit'cwd= (Get-Location).Path
prompt='Where is the Flutter app entry point main?'
} |ConvertTo-Json-Compress |codegraph.cmd prompt-hook
Run this from an indexed Flutter project. In my test the command returned a plain-text <codegraph_context> block. This verifies the command's input and output directly. I have not yet tested registration and context delivery in a live Codex turn.
Proposed behavior
Offer Codex prompt-hook setup alongside the existing MCP and instructions setup, reusing codegraph prompt-hook (codegraph.cmd prompt-hook on Windows).
Register it for UserPromptSubmit at the selected user or project scope. Preserve existing hooks and remove only the CodeGraph entry on uninstall.
Document Codex's hook review and trust step via /hooks and keep the existing behavior for prompts and projects that produce no CodeGraph context.
Activity