Skip to content

Distinguish installed plugins from active session hooks - #107

Open
adit-chandra wants to merge 1 commit into
adit-chandra/codex/retained-hook-bundlesfrom
adit-chandra/codex/plugin-activation-reporting
Open

adit-chandra wants to merge 1 commit into
adit-chandra/codex/retained-hook-bundlesfrom
adit-chandra/codex/plugin-activation-reporting

Conversation

@adit-chandra

Copy link
Copy Markdown
Contributor

Motivation

A marketplace update can install new files while the current session still holds old hook commands. The update skill previously reported a single reload result, allowing a skill discovery refresh to be mistaken for hook activation.

Summary

Record installed versions before and after updates, preserve partial failures, and report current-session activation separately. In Codex, skill discovery and hook listings do not establish hook activation; require evidence from a supported current-session reload, otherwise report a pending restart. In Claude, wait for the native /reload-plugins result or user confirmation instead of claiming a shell command or second process reloaded the session.

Document independent activation in other sessions and the first-rollout limitation: old loaded commands cannot gain the durable launcher merely because new files were installed. Keep old caches and retained bundles intact during activation.

Stack: depends on #106, which depends on #105. This PR changes the compiler-owned update skill sources and README only.

Validation

  • Build, command, and agent-skill tests: 149 passed.
  • Verified and rendered a temporary hub for all four targets; both generated update skills passed skill-validator check without warnings.
  • Reviewed successful update, partial installation failure, unavailable Codex reload, and Claude reload awaiting user confirmation against the output contract.
  • No marketplace update or live session reload was performed; this verifies rendering and instruction structure, not host acceptance.

@github-actions

Copy link
Copy Markdown

Codex Bug Bot

No new bugs detected in this PR.

adit-chandra added a commit that referenced this pull request Oct 23, 2026
## 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.
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