Skip to content

Detect AI agents and change some behavior #1354

@takaram

Description

@takaram

Description

When a git operation is done by AI agents, I want lefthook to change some behavior:

  • Less verbose output
    • e.g. no color, disable the border, etc.
  • Disable tty

What problem it is solving?

  • Verbose output consumes context window of AI
  • Codex running in a sandbox fails to open tty

Recently Vitest 4.1 introduced the feature to detect AI agent to give minimal output. It uses std-env to detect AI agents. We can probably refer to the logic of the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA new lefthook feature description

    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