Skip to content

Add hook visibility hints#21972

Open
abhinav-oai wants to merge 5 commits intomainfrom
abhinav/hook-visibility-hint
Open

Add hook visibility hints#21972
abhinav-oai wants to merge 5 commits intomainfrom
abhinav/hook-visibility-hint

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

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

Why

Hook lifecycle rendering can be pretty noisy because it has to do two jobs at once: tell users about consequential hook behavior, and surface background work that only exists to provide model context.

This issue cluster asks for a way to separate those concerns:

This replaces the managed-hook-only suppression approach from #21577 with a presentation hint that preserves the full lifecycle stream while letting clients decide what should stay in the foreground.

What

  • add per-hook visibilityHint = "default" | "quiet" | "verbose" config and carry it through HookRunSummary plus app-server lifecycle notifications
  • make default the concise everyday rendering mode, keep quiet for hooks that should avoid transient rows, and reserve verbose for the full hook stream
  • keep hook execution and lifecycle emission intact; visibilityHint is a rendering hint, not a suppression primitive

TUI rendering rules

visibilityHint Running row Completed context-only hook Consequential output (Warning, Feedback, Stop, Error)
default show hide show non-Context entries
quiet hide hide show non-Context entries
verbose show show show all entries

Blocked, failed, and stopped hooks always render a row; default and quiet still elide Context entries from those rows.

@abhinav-oai abhinav-oai changed the title [codex] Add hook visibility hints Add hook visibility hints May 9, 2026
@abhinav-oai abhinav-oai marked this pull request as ready for review May 9, 2026 21:43
@abhinav-oai abhinav-oai requested a review from a team as a code owner May 9, 2026 21:43
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: 012d0aa0ab

ℹ️ 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/hooks/src/engine/discovery.rs Outdated
Comment thread codex-rs/tui/src/history_cell/hook_cell.rs
@abhinav-oai
Copy link
Copy Markdown
Collaborator Author

what if we take this a step further and offer a better OOTB experience

since the current default is pretty verbose, what if change it so

  • default is what hidden is doing but will still show "running"
  • (new) verbose will be the same render all normally
  • hidden will instead be called quiet

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.

1 participant