Skip to content

hook print --claude emits bare charter, which won't resolve with the recommended local install #400

Closed

Description

@stackbilt-admin

Problem

charter hook print --claude prints a hook that calls a bare charter, on every prompt:

{ "hooks": { "UserPromptSubmit": [ { "matcher": ".*", "hooks": [ { "type": "command", "command": "charter context-refresh --once" } ] } ] } }

The README recommends a local devDependency install, which does not put charter on PATH, so the pasted hook would not resolve in that setup. The source is packages/cli/src/commands/hook.ts:540 on main. #379 fixed CLI resolution for git hooks but not for this output.

Expected

Print a command resolved for the repo's package manager, as the git hooks now do. Also consider whether UserPromptSubmit is the right default: --once limits the work, but SessionStart looks like a closer fit for a session snapshot.

Scope

The printed output is measured on 2.1.0. I did not run the hook inside Claude Code, so the resolution failure is inferred from how PATH works with a local install.

Activity

  1. added
    bug
    priority:p2
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions