Skip to content

deprecate legacy notify#20524

Merged
abhinav-oai merged 3 commits intomainfrom
abhinav/deprecate-legacy-notify
May 1, 2026
Merged

deprecate legacy notify#20524
abhinav-oai merged 3 commits intomainfrom
abhinav/deprecate-legacy-notify

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

@abhinav-oai abhinav-oai commented Apr 30, 2026

Why

notify is the remaining compatibility surface from the legacy hook implementation. The newer lifecycle hook engine now owns the active hook system, so we should start steering users away from adding new notify configs before removing the old path entirely. This also adds a lightweight watchpoint for the deprecation so we can see how much legacy usage remains before the clean drop.

What

  • emit a startup deprecation notice when a non-empty notify command is configured
  • emit codex.notify.configured when a session starts with legacy notify configured
  • emit codex.notify.run when the legacy notify path fires after a completed turn
  • mark notify as deprecated in the config schema and repo docs
  • remove the orphaned codex-rs/hooks/src/user_notification.rs file that is no longer compiled
  • add regression coverage for the new deprecation notice

Next steps

A follow-up PR can remove the legacy notify path entirely once we are ready for the clean drop. Before then, we can watch codex.notify.configured and codex.notify.run to understand the deprecation impact and remaining active usage. The cleanup PR should then delete the notify config field, the legacy_notify implementation, the old compatibility dispatch types and callsites that only exist for the legacy path, and the remaining compatibility docs/tests.

Testing

  • cargo test -p codex-hooks
  • cargo test -p codex-config
  • cargo test -p codex-core emits_deprecation_notice_for_notify

@abhinav-oai abhinav-oai changed the title [codex] deprecate legacy notify deprecate legacy notify Apr 30, 2026
@abhinav-oai abhinav-oai marked this pull request as ready for review April 30, 2026 23:30
@abhinav-oai abhinav-oai requested a review from a team as a code owner April 30, 2026 23:30
@abhinav-oai
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good. I think the deprecation warning text could be improved.

Comment thread codex-rs/core/src/session/session.rs Outdated
Comment thread docs/config.md

## Notify

Codex can run a notification hook when the agent finishes a turn. See the configuration reference for the latest notification settings:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be adding documentation to the OSS repo. The docs live in a different (external) repo, and we don't want to try to keep two copies of the docs in sync.

No need to fix in this PR. It looks like others have been adding docs here too. I'll do a separate clean-up pass after this PR lands. I'll also update the AGENTS.md guidance because that's probably causing codex to add docs here.

Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request May 1, 2026
Four PRs across opencode (3) and codex (1):
- anomalyco/opencode#25166: merge-as-is, server.mdx adds /global/config docs
- anomalyco/opencode#25143: merge-as-is, ecosystem.mdx adds opencode-swarm row
- anomalyco/opencode#25180: merge-after-nits, pre-stream Token.estimate
  proactive compaction at processor.ts:543-568 + 3 new overflow regex arms
- openai/codex#20524: merge-as-is, notify deprecation across README +
  TOML doc + JSON schema + struct doc + 2 metrics + DeprecationNotice
  event + 153-line user_notification.rs delete
@abhinav-oai abhinav-oai enabled auto-merge (squash) May 1, 2026 17:06
@abhinav-oai abhinav-oai merged commit 78baa20 into main May 1, 2026
25 checks passed
@abhinav-oai abhinav-oai deleted the abhinav/deprecate-legacy-notify branch May 1, 2026 17:35
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants