feat(epic-loop): run the hook loop on Claude Code, not just Codex#1
Open
usulpro wants to merge 1 commit into
Open
feat(epic-loop): run the hook loop on Claude Code, not just Codex#1usulpro wants to merge 1 commit into
usulpro wants to merge 1 commit into
Conversation
Add dual-platform support so the same skill drives the techlead/engineer
Stop-hook loop on either Codex or Claude Code (one platform per session).
The loop engine is unchanged: Codex and Claude Code share the same Stop
continuation contract ({ "decision": "block", "reason": <prompt> }), the
same hook-config entry shape, and the same stdin payload fields. Only the
platform-specific setup/detection branches:
- platform helpers in lib/common.mjs: detectPlatform (auto via CLAUDECODE /
config presence, overridable with --platform), hookConfigRelativePath,
readCurrentClaudeSession (session id = transcript filename under
~/.claude/projects/<encoded-cwd>), and readLastAssistantMessage which
falls back to the transcript tail on Claude Code (no last_assistant_message
in its Stop payload)
- install-hooks / doctor target .claude/settings.json (deep-merged, no
feature flag) for Claude Code and keep .codex/hooks.json for Codex
- bind-session --current and debug detect the platform
- hook.mjs is invoked with --platform; handleHook threads it into the
engineer-report capture
- expose the skill at .claude/skills/epic-loop as a symlink to the single
source in .agents/skills/epic-loop so Claude Code discovers it without a
duplicated copy
- docs: SKILL.md, hooks-and-session-routing.md, and README cover both platforms
https://claude.ai/code/session_0157kdfjwZJmDd1mx7S93TyT
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.
Add dual-platform support so the same skill drives the techlead/engineer
Stop-hook loop on either Codex or Claude Code (one platform per session).
The loop engine is unchanged: Codex and Claude Code share the same Stop
continuation contract ({ "decision": "block", "reason": }), the
same hook-config entry shape, and the same stdin payload fields. Only the
platform-specific setup/detection branches:
config presence, overridable with --platform), hookConfigRelativePath,
readCurrentClaudeSession (session id = transcript filename under
~/.claude/projects/), and readLastAssistantMessage which
falls back to the transcript tail on Claude Code (no last_assistant_message
in its Stop payload)
feature flag) for Claude Code and keep .codex/hooks.json for Codex
engineer-report capture
source in .agents/skills/epic-loop so Claude Code discovers it without a
duplicated copy
https://claude.ai/code/session_0157kdfjwZJmDd1mx7S93TyT