Skip to content

Add presentation hint for quiet managed hooks#22493

Open
abhinav-oai wants to merge 8 commits into
mainfrom
abhinav/managed-hook-visibility-hint
Open

Add presentation hint for quiet managed hooks#22493
abhinav-oai wants to merge 8 commits into
mainfrom
abhinav/managed-hook-visibility-hint

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

@abhinav-oai abhinav-oai commented May 13, 2026

Why

Hooks can run on every turn, which makes routine hook activity noisy in the client. Admins may want to silence hooks such that they're only surfaces when there are E.rrors or other "steering" actions like a Block or Feedback.

What

  • add a per-hook visibility_hint with the narrow shape default | hidden
  • allow hidden to take effect only for managed hook sources, keeping the user-facing hook config surface unchanged
  • thread the hint through hook config, runtime summaries, and app-server notifications
  • keep trust hashing stable by excluding this presentation-only hint from hook identity normalization

Reviewer Note

Most of the diff is just plumbing, the key file to review is codex-rs/tui/src/history_cell/hook_cell.rs

Presentation rules

Hook visibility Hook outcome Transcript behavior
default running Only render while running.
default completed with no entries Do not render a completed row.
default all else Render exactly as reported.
hidden running Do not render the running row.
hidden completed with no displayable entries Do not render a completed row.
hidden completed with only Context entries Do not render a completed row.
hidden completed with Context plus user-facing output such as Warning Render the hook row and keep only the user-facing entries.
hidden Blocked, Failed, or Stopped Always render so the transcript explains consequential hook behavior.

@abhinav-oai abhinav-oai marked this pull request as ready for review May 13, 2026 14:49
@abhinav-oai abhinav-oai requested a review from a team as a code owner May 13, 2026 14:49
@abhinav-oai
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3648614f8c

ℹ️ 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".

Comment thread codex-rs/tui/src/chatwidget/hook_lifecycle.rs
@lukehinds
Copy link
Copy Markdown

I really wish this issue were given some priority - its a real mess of a UX having the tool dump its output every call.

…visibility-hint

# Conflicts:
#	codex-rs/app-server-protocol/schema/json/ServerNotification.json
#	codex-rs/tui/src/history_cell.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants