Skip to content

Claude Code hooks documentation for UserPromptSubmit to improve consistent behavior #253

@johnlindquist

Description

@johnlindquist

Pro tip for Claude code users: Add this to .claude/settings.local.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"Remember to always use the mcp__container-use__environment tools!\""
          }
        ]
      }
    ]
  }
}

and it will inject that prompt after every user request. This allows me to have a much more verbose CLAUDE.md while still reliably invoking the container-use mcp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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