Skip to content

Commit 4ad31a4

Browse files
committed
docs(codex): document the Generated-with SessionStart hook
Adds setup instructions for wiring `assistantkit codex hooks generated-with` into ~/.codex/config.toml as a SessionStart hook.
1 parent 18987eb commit 4ad31a4

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

docs/assistants/codex.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@ Copy your plugin to the Codex plugins directory:
4545
cp -r my-plugin ~/.codex/plugins/
4646
```
4747

48+
## Hooks
49+
50+
AssistantKit includes a Codex `SessionStart` hook command that reads Codex hook
51+
JSON from stdin and injects commit-message guidance with the active model:
52+
53+
```bash
54+
assistantkit codex hooks generated-with
55+
```
56+
57+
Add it to `~/.codex/config.toml`:
58+
59+
```toml
60+
commit_attribution = "Co-authored-by: OpenAI Codex <codex@openai.com>"
61+
62+
[[hooks.SessionStart]]
63+
matcher = "startup|resume|clear|compact"
64+
65+
[[hooks.SessionStart.hooks]]
66+
type = "command"
67+
command = "/Users/johnwang/go/bin/assistantkit codex hooks generated-with"
68+
timeout = 10
69+
statusMessage = "Loading Codex commit attribution context"
70+
```
71+
72+
The hook emits a `Generated-with: OpenAI Codex <model>` instruction using the
73+
`model` field from Codex hook input.
74+
4875
## Available Tools
4976

5077
| Tool | Description |

0 commit comments

Comments
 (0)