Skip to content

fix(codex): drop activity-marker hooks Codex can't drive - #2786

Merged
max-sixty merged 2 commits into
mainfrom
dsa/support-codex
May 17, 2026
Merged

fix(codex): drop activity-marker hooks Codex can't drive#2786
max-sixty merged 2 commits into
mainfrom
dsa/support-codex

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The Codex plugin shipped hooks.json with SessionStart→💬, UserPromptSubmit→🤖, and Stop→💬. But codex-cli 0.130.0's HookEventNameWire schema (extracted from the binary) has no Stop/turn-end event: PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, SessionStart, UserPromptSubmit. So on Codex the 🤖 marker set at UserPromptSubmit could 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-create as Claude-Code-only. A re-enablement comment (exact conditions + the files to restore) lives in src/commands/config/codex.rs and a new CLAUDE.md → "Codex Plugin" section, which also documents the accepted tradeoff that the skills/ symlink exposes the Claude-only wt-switch-create skill to Codex (harmless — Codex can't act on it).

Bundled adjacent fixes: plugin.json metadata drift (description/longDescription no longer claim activity hooks; homepage/websiteURL https://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 + --help text), docs/content/claude-code.md (skill ref + llms.txt auto-synced), CLAUDE.md (new section), tests/integration_tests/config_show.rs (test_codex_plugin_metadata_is_valid_json now asserts hooks absent + 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

max-sixty and others added 2 commits May 17, 2026 15:07
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>
@max-sixty
max-sixty merged commit 233cd49 into main May 17, 2026
34 checks passed
@max-sixty
max-sixty deleted the dsa/support-codex branch May 17, 2026 22:29
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.

2 participants