Skip to content

Scope the session.append hook to response rows - #21

Open
jeanfbrito wants to merge 1 commit into
scasella:mainfrom
jeanfbrito:fix/session-append-response-door
Open

jeanfbrito wants to merge 1 commit into
scasella:mainfrom
jeanfbrito:fix/session-append-response-door

Conversation

@jeanfbrito

@jeanfbrito jeanfbrito commented Oct 24, 2026 •

Copy link
Copy Markdown

Summary

On a Team or Enterprise organization, Claude Code seats its built-in cc-plugin-sec-default plugin outermost. That plugin passes the plugins a person installs over on some events, which include session.append rows that come in through the attachment, hook-context and compaction doors. Flightdeck's session.append hook had no matcher, so the session showed this notice:

flightdeck: its session.append hook was skipped. "cc-plugin-sec-default" runs first and sent the event on past it.

The hook reads only assistant rows, which come in through the response door. This change gives the hook a { door: 'response' } matcher. The hook sees the same rows as before, and it no longer subscribes to the doors that the security plugin passes over.

Not in this change

The security plugin also skips the classic.UserPromptSubmit hook, because it passes user plugins over on all classic.* events. A user-tier plugin cannot skip past a managed tier, so Flightdeck cannot fix this. On such machines the mode field updates only from agent.spawn. No other event that a user plugin can hook carries the permission mode.

Verification

  • claude plugin validate . passes.
  • claude plugin test .: 50 pass, 0 fail.
  • Seen with Claude Code 2.1.310 on an Enterprise organization.
  • Live check on 0.5.1 with this change installed: after a restart, the session showed no session.append notice. The resumed session appended hook-context rows, which caused the notice before the change. The classic.UserPromptSubmit notice still shows, as expected.

cc-plugin-sec-default passes user plugins over on the attachment, hook-context and compaction doors. The hook reads only assistant rows, which come through the response door.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T18:34:00.068925Z
We couldn’t complete this review. Comment @codex review to try again.
488746f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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