Troubleshooting
大多數問題來自 local git hooks、缺失的 git notes,或 GitHub Pages 設定。
-
檢查 local setup。
Terminal window npx agent-note status -
檢查 commit 是否有 note。
Terminal window npx agent-note show -
檢查 remote notes。
Terminal window git fetch origin refs/notes/agentnote:refs/notes/agentnotegit notes --ref=agentnote show HEAD
| 症狀 | 先看這裡 |
|---|---|
| PR Report 為空 | 確認 notes 已 push,且 workflow 取得了完整 git history |
| 期望的 prompt 沒有顯示 | 比較 compact 與 full |
| Dashboard 能開啟,但 PR 沒有資料 | 確認該 PR 的 notes 是否已發布 |
git commit 沒有建立 note | 重新執行 init,並檢查 status 中的 git: 行 |
| Line Estimate 沒有顯示 | 確認 Agent 是否能提供足夠的編輯證據 |
PR Report 為空
Section titled “PR Report 為空”- PR branch 是在啟用 Agent Note 後 push 的。
- remote 上存在
refs/notes/agentnote。 actions/checkout使用fetch-depth: 0。- PR 包含 agent 修改過檔案的 commits。
如果 commit 中找不到 agent 修改過的已提交檔案,Agent Note 不會寫 note。
如果 header 顯示 Total AI Ratio: — 和 Agent Note data: No tracked commits,表示 PR 有 commits,但沒有找到這些 commit 的 Agent Note data。這不同於真正的 AI Ratio 0%。
Prompt 缺失
Section titled “Prompt 缺失”prompt selection 基於 commit-to-commit window,而不是整個 session。
compact優先顯示解釋 commit 所需的 prompt。full顯示所有保存的 prompt。- 目前 commit 有自己的說明時,舊 task prompt 會被省略。
- 當檔名或 code identifier 能幫助理解短 prompt 時,會顯示
📝 Context。
with: prompt_detail: fullDashboard 沒有資料
Section titled “Dashboard 沒有資料”- GitHub Pages source 應為 GitHub Actions。
- workflow 必須以
dashboard: true執行。 - 第一次 deploy 成功後會建立
/dashboard/。 - 如果 Pull Request Deploy 被阻擋,open PR data 會在 merge 後顯示。
Dashboard 開啟了錯誤的 PR
Section titled “Dashboard 開啟了錯誤的 PR”Dashboard 首頁應顯示共享歷史,而不是強制跳轉到 ?pr=。只有 PR Report 連結會附帶目前 PR 的 ?pr=<number>。
如果舊的 Pages deploy 仍然跳轉,請重新執行 Dashboard workflow,或等待 main 的下一次成功 deploy。
git commit 沒有被追蹤
Section titled “git commit 沒有被追蹤”npx agent-note statusnpx agent-note init --agent claudegit hooks 是 .git/ 內的本機設定,因此每個 clone 都需要 init。
Line Estimate 沒有顯示
Section titled “Line Estimate 沒有顯示”這通常是正常的。
- Claude Code 通常能提供 Line Estimate 所需的編輯證據。
- Codex CLI 只有在 transcript patch 數量符合最終 commit diff 時才能估算行數。
- Cursor 只有在 edit 數量符合,且最終檔案仍符合最後一次 AI edit 時才能估算行數。
- Gemini CLI 目前只顯示檔案級 AI Ratio。
當證據不足時,Agent Note 會回退到保守判定,而不是猜測。