mirror of
https://github.com/mindfold-ai/Trellis.git
synced 2026-04-25 10:06:00 +03:00
[GH-ISSUE #24] Windows: PreToolUse Task hook error - $CLAUDE_PROJECT_DIR not resolved (literal path error) #20
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Trellis#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flyGetHu on GitHub (Feb 3, 2026).
Original GitHub issue: https://github.com/mindfold-ai/Trellis/issues/24
Description
When using Claude's toolchain/hooks on Windows system, the PreToolUse:Task hook error is thrown because the environment variable $CLAUDE_PROJECT_DIR is not parsed and is treated as a literal string in the file path. This causes the Python interpreter to fail to find the inject-subagent-context.py file, as the path is incorrectly spliced with the unparsed variable name.
Error: PreToolUse:Task hook error: [python3 "$CLAUDE_PROJECT_DIR/.claude/hooks/inject-subagent-context.py"]: C:\Users\97078\scoop\apps\python\current\python.exe: can't open file
'C:\Users\97078\workspace\java\anjun-customs-project\$CLAUDE_PROJECT_DIR\.claude\hooks\inject-subagent-context.py': [Errno 2] No such file or directory
@taosu0216 commented on GitHub (Feb 3, 2026):
what is your trellis version, you can check it with tl -v
@taosu0216 commented on GitHub (Feb 3, 2026):
We removed the environment variable in version v0.3.0-beta.7 and used relative paths to solve this issue instead.
@flyGetHu commented on GitHub (Feb 3, 2026):
❯ trellis.cmd -v
0.2.11
try update last version