Skip to content

[BUG] When I use hooks the CLAUDE_PROJECT_DIR isn't found #6023

@cskiwi

Description

@cskiwi

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: v1.0.83
  • Operating System: windows 11
  • Terminal: git bash, cmd

Bug Description

When I use hooks the CLAUDE_PROJECT_DIR isn't found

Steps to Reproduce

  1. Add a hook
  2. Start claude

Expected Behavior

Hooks to be working

Actual Behavior

╰─ claude
(node:36220) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)

╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                        │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: C:\git\RND\uptime                          │
╰───────────────────────────────────────────────────╯

  ↑ Connect Claude to VS Code · /ide


● SessionStart:startup [$CLAUDE_PROJECT_DIR/.claude/hooks/load-behavioral-system.sh] failed with non-blocking
  status code 1: '$CLAUDE_PROJECT_DIR' is not recognized as an internal or external command,
  operable program or batch file.

Additional Context

I'm trying to setup the following agents: https://github.com/vanzan01/claude-code-sub-agent-collective

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions