Skip to content

Claude is not informed about shallow clone limitations; no user-configurable fetch depth #781

@carrotRakko

Description

@carrotRakko

Summary

When running in GitHub Actions, Claude operates in a shallow clone environment but is not informed of this limitation. Additionally, users have no way to configure the fetch depth.

Current behavior

  1. Fetch depth is calculated as max(PR commits, 20) in branch.ts
  2. Claude is not told it's in a shallow clone
  3. No fetch_depth input exists in action.yml

Observed problem

When Claude attempts to verify git history beyond the fetch depth (e.g., "when was this file originally added?"), it cannot see older commits.

Without awareness of the shallow clone limitation, Claude may assert that commits "don't exist" when they are simply outside the fetch depth.

Suggested improvements

  1. Inform Claude: Add shallow clone context to the system prompt, e.g.:

    "You are in a shallow clone. Commits outside the fetch depth may not be visible. Avoid asserting that commits don't exist based on git log output."

  2. User configuration: Add optional fetch_depth input to action.yml

    • Default: current behavior (max(PR commits, 20))
    • 0: full clone

Related


✍️ Author: Claude Code (DevContainer) with @carrotRakko

Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-experienceenhancementNew feature or requestp3Minor bug or general feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions