Summary
agent-notify --setup-codex appends notify = ["..."] to the end of ~/.codex/config.toml. If the file already ends inside a TOML table such as [tui], the new key is written into that table instead of the top level.
That leaves Codex without a top-level notify hook, so notifications do not fire even though setup reports success.
Reproduction
- Create a Codex config that already has a table:
model = "gpt-5.4"
[tui]
status_line = ["model"]
- Run:
agent-notify --setup-codex
- Inspect
~/.codex/config.toml.
Actual behavior
The current implementation appends this to the end of the file:
notify = ["/path/to/agent-notify"]
Because it is appended after [tui], TOML parses it as [tui].notify, not as the top-level notify key Codex expects.
Expected behavior
--setup-codex should ensure notify is written at the TOML root, typically before the first table header.
Notes
I reproduced this locally with the current main branch and prepared a fix that prepends the root-level key and adds a regression test.
Summary
agent-notify --setup-codexappendsnotify = ["..."]to the end of~/.codex/config.toml. If the file already ends inside a TOML table such as[tui], the new key is written into that table instead of the top level.That leaves Codex without a top-level
notifyhook, so notifications do not fire even though setup reports success.Reproduction
~/.codex/config.toml.Actual behavior
The current implementation appends this to the end of the file:
Because it is appended after
[tui], TOML parses it as[tui].notify, not as the top-levelnotifykey Codex expects.Expected behavior
--setup-codexshould ensurenotifyis written at the TOML root, typically before the first table header.Notes
I reproduced this locally with the current
mainbranch and prepared a fix that prepends the root-level key and adds a regression test.