Skip to content

Ship Codex activity-marker hooks as a separate hooks-only plugin - #4707

Merged
max-sixty merged 1 commit into
mainfrom
codex-markers-plugin
Nov 5, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex-markers-plugin

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Codex 0.164+ ties plugin hook approval to a fingerprint of every file in the plugin directory. The worktrunk plugin keeps the skills mirror and docs next to its four marker hooks, so almost every release made Codex ask users to approve hooks that hadn't changed (#4654). This PR moves those hooks into a second plugin, worktrunk-markers. It holds only its manifest and copies of the wt.sh/wt.cmd shims, so its fingerprint changes only when the hooks or shims change. wt config plugins codex install adds both plugins, and uninstall removes both.

The design follows the live test max-sixty posted in #4654 on Codex 0.166.0. A skill or README change re-prompted the combined plugin but not a hooks-only one. That test also listed four requirements, and this PR covers each one:

  • Existing installs. When an existing user's worktrunk plugin updates, its hooks go away silently. The installer adds the markers plugin, and the Codex section of the agent-integration docs now names codex plugin add worktrunk-markers@worktrunk for older installs.
  • No Claude hooks warning. The worktrunk Codex manifest keeps "hooks": {"hooks": {}}, so Codex does not read Claude's hooks/hooks.json and warn.
  • Real shim files. The shims are real copies, not symlinks. The new test_codex_markers_shims_match checks that they match plugins/worktrunk/hooks/ byte for byte, that the directory holds only those three files, and that the manifest has no version. Neither manifest has a version today, and no release step edits plugin.json.
  • Uninstall. uninstall removes the markers plugin first. codex plugin remove already exits 0 for a plugin that isn't installed, so older single-plugin installs uninstall cleanly.

Verification: the Codex plugin, layout, help and docs-sync tests pass locally, with snapshots updated for the new install and uninstall output. In the sandbox, the full pre-merge gate stopped on cargo fmt (fixed in this commit) and on test failures that come from the sandbox itself: blocked Unix sockets, a 0644 signing key, and a nushell autoload file left in the shared home. test_config_show_codex_available fails the same way on main here. Two things are unverified. I haven't run a real Codex session against this branch. I also haven't checked that running wt config plugins codex install again succeeds when the marketplace is already registered, which is why the upgrade note in the docs names the direct codex plugin add command.

Closes #4654

Codex 0.164+ binds plugin hook approval to a fingerprint of the whole
plugin directory. The worktrunk plugin holds the skills mirror and docs
next to its hooks, so nearly every release made Codex ask users to
approve the unchanged marker hooks again.

The four marker hooks move to plugins/worktrunk-markers, which holds only
its manifest and real copies of the wt.sh/wt.cmd shims. The worktrunk
manifest keeps an empty inline `hooks` object so Codex does not read
Claude's hooks/hooks.json. `wt config plugins codex install` adds both
plugins and `uninstall` removes both.

A test keeps the shim copies byte-identical to plugins/worktrunk/hooks,
restricts the markers directory to its three files, and rejects a
manifest `version`, since any of those changes re-prompts every user.

Closes #4654

Co-Authored-By: Claude <[email protected]>
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.

Codex repeatedly asks to review and trust Worktrunk activity hooks

2 participants