fix(codex): drop activity-marker hooks Codex can't drive - #2786
Merged
Conversation
Codex-cli 0.130.0's HookEventNameWire vocabulary (PreToolUse,
PermissionRequest, PostToolUse, PreCompact, PostCompact, SessionStart,
UserPromptSubmit) has no Stop/turn-end event. The shipped hooks.json set
🤖 on UserPromptSubmit and 💬 on a Codex-nonexistent Stop event, so a
Codex worktree's marker stuck at 🤖 ("working") for the whole session
and never returned to 💬.
Remove the marker hooks entirely until Codex exposes a turn-end hook
event; the Codex plugin now ships only the configuration skill. Bundled
adjacent fixes: corrected plugin.json metadata drift (description and
homepage/websiteURL no longer claim activity hooks or the /claude-code/
slug), and made the install/uninstall/--help/docs text honest about
activity tracking being Claude Code only.
A re-enablement comment (conditions + files to restore) lives in
src/commands/config/codex.rs and CLAUDE.md → "Codex Plugin". The
metadata test now guards the description/URL drift against regressing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 17, 2026
This was referenced Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Codex plugin shipped
hooks.jsonwithSessionStart→💬,UserPromptSubmit→🤖, andStop→💬. But codex-cli 0.130.0'sHookEventNameWireschema (extracted from the binary) has noStop/turn-end event:PreToolUse,PermissionRequest,PostToolUse,PreCompact,PostCompact,SessionStart,UserPromptSubmit. So on Codex the 🤖 marker set atUserPromptSubmitcould never return to 💬 — a Codex worktree stuck at "working" for the entire session. That's worse than the docs claimed ("rests at 💬").This removes the marker hooks entirely until Codex exposes a turn-end hook event. The Codex plugin now ships only the configuration skill; activity tracking joins worktree-isolation and
/wt-switch-createas Claude-Code-only. A re-enablement comment (exact conditions + the files to restore) lives insrc/commands/config/codex.rsand a newCLAUDE.md→ "Codex Plugin" section, which also documents the accepted tradeoff that theskills/symlink exposes the Claude-onlywt-switch-createskill to Codex (harmless — Codex can't act on it).Bundled adjacent fixes:
plugin.jsonmetadata drift (description/longDescriptionno longer claim activity hooks;homepage/websiteURLhttps://worktrunk.dev/claude-code/→https://worktrunk.dev), and the install/uninstall/--help/docs text made honest about Codex having only the configuration skill.Reviewer navigation:
src/commands/config/codex.rs+src/cli/config.rs(runtime +--helptext),docs/content/claude-code.md(skill ref +llms.txtauto-synced),CLAUDE.md(new section),tests/integration_tests/config_show.rs(test_codex_plugin_metadata_is_valid_jsonnow assertshooksabsent + guards metadata regression). Snapshot env-block churn is stale-fixture convergence to the repo's current/nonexistent/wt/convention, not a leak.Testing: Full pre-merge gate green locally (3704 tests, 0 skipped; lints clean). The metadata test was strengthened; the marker behavior itself is removed, so there's nothing runtime-testable to add.
🤖 Generated with Claude Code