Skip to content

Keep missing portable hooks from blocking agent sessions - #105

Merged
adit-chandra merged 2 commits into
mainfrom
adit-chandra/codex/hook-failure-isolation
Oct 23, 2026
Merged

adit-chandra merged 2 commits into
mainfrom
adit-chandra/codex/hook-failure-isolation

Conversation

@adit-chandra

@adit-chandra adit-chandra commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

When a marketplace update removes a plugin version still referenced by a running session, Python exits with code 2 before the hook adapter starts. Codex interprets that infrastructure failure as an intentional hook block, potentially hiding the result of a command that already ran.

Summary

Embed a Python launcher in portable hook commands so it survives deletion of plugin files. Portable context hooks now report bounded failure diagnostics and exit successfully; native JSON hooks retain their authored blocking semantics. Execution remains in-process so cancellation reaches handlers.

Stack: this PR targets main; #106 adds retained runtime bundles on top, and #107 separates installation from current-session activation.

Validation

  • Full suite: 1,053 passed.
  • Focused hook suite: 59 passed, covering deleted adapters, entrypoints and helpers across Claude, Codex and Cursor; script exit 2; and native blocking behavior.
  • Repository-wide Ruff lint/format and ty passed (using the worktree environment).
  • Generated commands exercised in local subprocesses; live desktop-host acceptance and marketplace publication are not part of this PR.

@github-actions

Copy link
Copy Markdown

Codex Bug Bot

No new bugs detected in this PR.

@adit-chandra
adit-chandra merged commit 4f6d78c into main Oct 23, 2026
12 checks passed
@adit-chandra
adit-chandra deleted the adit-chandra/codex/hook-failure-isolation branch October 23, 2026 01:08
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