Teach session-catchup.py to read Codex rollout JSONL, skip the current Codex thread, filter subagent/tiny sessions, and detect structured planning updates. Update tests and docs for the new behavior.
Co-authored-by: Codex <noreply@openai.com>
The literal '---' inside the UserPromptSubmit hook command was parsed as
a YAML document separator, corrupting the skill description and causing
PreToolUse:Write hook errors. Changed to '=== recent progress ===' in
all 11 affected files.
Two root causes found:
1. Path sanitization bug: On Windows, Git Bash passes /c/Users/... but
Claude Code stores sessions under C--Users-... The script converted
to -c-Users-... which never matched. Added normalize_path() that
converts Git Bash paths to Windows paths before sanitizing.
2. Hook was advisory, not actionable: UserPromptSubmit hook only said
"read task_plan.md" — after /clear the agent has no context and may
ignore text advice. Now the hook dumps actual content: first 50 lines
of task_plan.md + last 20 lines of progress.md. The agent gets the
plan state injected directly, no tool calls needed.
Also fixed: UTF-8 encoding for session file parsing on Windows (cp1252
default caused UnicodeDecodeError on non-ASCII content).
Changes synced to all IDE variants via sync-ide-folders.py.
Restores the Codex-specific fallback in session-catchup.py that was overwritten by the v2.23.0 sync. When running from a Codex skill path, the script now skips cleanly instead of silently scanning Claude storage.
Changes:
- Fix root cause in canonical session-catchup.py (not just Codex copy)
- Sync fix across all 7 IDE copies
- Add regression test to prevent future overwrites
Thanks @YSAA1