Troubleshooting
April 26, 2026 · View on GitHub
Short answers for the most common friction. For the operational contract on blocks and anchors, see Keeping blocks in sync.
commentray validate fails after I “only” edited prose
- Markdown marker ↔ index: Every
<!-- commentray:block id=… -->must matchblocks[].idin.commentray/metadata/index.jsonfor that companion file. lines:anchors: Line insertions or deletions in the source file can invalidate stored ranges—updateanchor(and optionalsnippet) or switch tomarker:regions for moving targets.
commentray init scm says there is no .git
Initialize Git first (git init) or run the command from the repository root that contains .git.
Pre-commit never runs Commentray
- Confirm
commentrayis onPATHin the same environment Git uses for hooks (GUI clients sometimes differ). - Open
.git/hooks/pre-commitand verify the Commentray block is present and not short-circuited by an earlierexit. - For ad hoc or CI runs without a global install,
npx commentray …works the same way;npx commentray --helpprintsUsage: commentray [options] [command](hooks still need eitherPATHor an explicitnpx/ full path in the hook script).
macOS blocks the downloaded CLI binary
See Development → macOS quarantine (standalone CLI).
COMMENTRAY_SEA_NODE / binary build complaints
Local SEA builds want a Node layout compatible with the bundling step. Point COMMENTRAY_SEA_NODE at a nodejs.org-style binary matching CI’s major version. Details: Development → Building binaries locally.
Extension does not open the file I expect
- Angles: If
.commentray/source/.defaultexists, paths aresource/{primaryPath}/{angle}.md—not the flat{primaryPath}.mdlayout. Seedocs/spec/storage.md. - Run
commentray paths my/file.tsto print the conventional flat path; compare with your.commentray.tomland on-disk layout.
Still stuck
Run commentray doctor from the repo root and read the combined validate + environment messages. For behavior definitions, see What Commentray detects and the specs linked from Quickstart.