Problem
The system prompt of opencode sessions running via the globally installed binary (/usr/local/bin/opencode) contains a # Claude Code Hooks API section describing the old hooks system:
- 6-layer settings chain (including
.claude/settings.json paths) — current implementation uses 3-layer hooks.json chain
- 22 events — current implementation supports 27 events
- References
~/.config/opencode/docs/hooks-reference.md which does not exist
Root Cause
The text was embedded in the opencode binary compiled from a source version before the hooks migration (PRs #51-#56). The source code has since been updated — the text no longer exists in any .ts / .txt / .md file in the repo.
Impact
Agent receives incorrect guidance about hooks configuration (wrong file locations, wrong event list, wrong format).
Fix
Rebuild and reinstall the global binary from the latest main after the hooks migration PRs are merged. No source code change needed — the text is already gone from the source.
Verification
After reinstalling, start a new session and check the system prompt for Claude Code Hooks API — it should be absent or updated to reflect the 3-layer hooks.json chain and 27 events.
Identified during FABLE5 review of PR #57. See openspec/changes/fix-hooks-review-polish task 1.2.
Problem
The system prompt of opencode sessions running via the globally installed binary (
/usr/local/bin/opencode) contains a# Claude Code Hooks APIsection describing the old hooks system:.claude/settings.jsonpaths) — current implementation uses 3-layer hooks.json chain~/.config/opencode/docs/hooks-reference.mdwhich does not existRoot Cause
The text was embedded in the opencode binary compiled from a source version before the hooks migration (PRs #51-#56). The source code has since been updated — the text no longer exists in any
.ts/.txt/.mdfile in the repo.Impact
Agent receives incorrect guidance about hooks configuration (wrong file locations, wrong event list, wrong format).
Fix
Rebuild and reinstall the global binary from the latest
mainafter the hooks migration PRs are merged. No source code change needed — the text is already gone from the source.Verification
After reinstalling, start a new session and check the system prompt for
Claude Code Hooks API— it should be absent or updated to reflect the 3-layer hooks.json chain and 27 events.