anthropics / anthropics/claude-code-action

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

オープン
#781 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
dev-experience enhancement p3
主要言語
TypeScript
スター
8.9k
フォーク
2.1k
平均マージ
3日 9時間
マージ済み PR(30日)
10

説明

## 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

- #52 introduced shallow fetch for performance in large repositories

---

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

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。