Describe the bug
With hooks enabled (the default), gortex install writes the user-level lifecycle hooks of the default hook host (gortex hook without --agent) into ~/.claude/settings.local.json, the file docs/agents.md lists for user-level hooks. The host does not read that file as user settings: user-scope settings come from ~/.claude/settings.json, and settings.local.json is only read as a project file, <project>/.claude/settings.local.json. So the user-level hooks never run, except in a session whose project root is the home directory.
gortex doctor hides the problem: its install section reports each hook as configured, while its activity section says no hook has ever run.
To Reproduce
gortex install --yes (hooks are on by default), then gortex daemon start --detach.
gortex track <repo>.
- Start an agent session in
<repo> and let it make a few tool calls, Gortex MCP calls included.
gortex doctor.
Result:
- install section:
✓ hook SessionStart 1 configured, and the same for UserPromptSubmit, PreToolUse, PostToolUse and Stop;
- activity section: no
~/.gortex/cache/hook-effectiveness.jsonl, "no hook has ever run on this machine";
- the session transcript holds no Gortex SessionStart orientation.
Handing the very same hooks block to the host explicitly, through its --settings <file> flag, makes every hook fire: the SessionStart orientation shows up in the transcript. The hook commands work; the target file is the problem.
Expected behavior
The user-level hooks fire in every repository, and doctor reports what actually runs.
Suggested fix
Merge the user-level hooks into ~/.claude/settings.json (keeping the existing config-dir override), leave settings.local.json to the repo-level hooks written by gortex init, and have doctor check the file the host loads, so it cannot show "configured" for hooks that can never run.
Environment:
- OS: Windows 11 (build 26200), amd64
- Go version: n/a, release binary (built with go1.27.0)
- Gortex version: v0.64.5+3310720
Describe the bug
With hooks enabled (the default),
gortex installwrites the user-level lifecycle hooks of the default hook host (gortex hookwithout--agent) into~/.claude/settings.local.json, the file docs/agents.md lists for user-level hooks. The host does not read that file as user settings: user-scope settings come from~/.claude/settings.json, andsettings.local.jsonis only read as a project file,<project>/.claude/settings.local.json. So the user-level hooks never run, except in a session whose project root is the home directory.gortex doctorhides the problem: its install section reports each hook as configured, while its activity section says no hook has ever run.To Reproduce
gortex install --yes(hooks are on by default), thengortex daemon start --detach.gortex track <repo>.<repo>and let it make a few tool calls, Gortex MCP calls included.gortex doctor.Result:
✓ hook SessionStart 1 configured, and the same for UserPromptSubmit, PreToolUse, PostToolUse and Stop;~/.gortex/cache/hook-effectiveness.jsonl, "no hook has ever run on this machine";Handing the very same
hooksblock to the host explicitly, through its--settings <file>flag, makes every hook fire: the SessionStart orientation shows up in the transcript. The hook commands work; the target file is the problem.Expected behavior
The user-level hooks fire in every repository, and doctor reports what actually runs.
Suggested fix
Merge the user-level hooks into
~/.claude/settings.json(keeping the existing config-dir override), leavesettings.local.jsonto the repo-level hooks written bygortex init, and have doctor check the file the host loads, so it cannot show "configured" for hooks that can never run.Environment: