Skip to content

fix(skills): prevent premature thread resolution on self-authored PRs#1585

Open
worktrunk-bot wants to merge 1 commit intomainfrom
hourly/review-23182731676
Open

fix(skills): prevent premature thread resolution on self-authored PRs#1585
worktrunk-bot wants to merge 1 commit intomainfrom
hourly/review-23182731676

Conversation

@worktrunk-bot
Copy link
Collaborator

Summary

  • Adds thread-resolution guidance to review-pr skill Step 6 requiring substantive verification before resolving threads (not just checking if the author rewrote the code)
  • Adds specific warning about self-authored PR bias where the bot is both author and reviewer

Evidence

Run 23182191893 reviewing PR #1583 (fix/issue-1572-trash-dir):

The bot's earlier review correctly identified that linked worktrees can live on different mount points, so rename() from a linked worktree path to .git/wt-trash/ could fail with EXDEV. It suggested a doc comment:

For the main worktree, .git/ is on the same filesystem, so rename() is an instant metadata operation. Linked worktrees on different mount points will get EXDEV and fall back to legacy removal.

In run 23182191893 (incremental review), the bot encountered the author's version which claims "The .git/ directory is always on the same filesystem as the worktree (git requires this)" and reasoned "The author's version is actually more accurate." It then resolved the thread.

The original suggestion was correct — git does NOT require .git/ and linked worktrees to share a filesystem. The .git entry in a linked worktree is a file pointing to <git-common-dir>/worktrees/<name>, and that common dir can be on any mount point. The code handles this correctly (fallback to legacy removal on rename failure), but the doc comment is misleading.

Root cause: When the bot authored the PR and then reviews it, there's a bias toward trusting the code's own claims rather than independently verifying them.

Other observations (no action needed)

  • Inconsistent skill loading: Run 23182191893 skipped loading running-in-ci, unlike all other review sessions. Intermittent model behavior, not fixable via skill changes.
  • Verbose subagent on mention: Run 23181353198 spawned an Explore subagent with 19+ tool calls for a straightforward documentation question on issue Hook names and order are not clear #1571.
  • Overlapping responses: Two bot comments on issue Hook names and order are not clear #1571 (runs 23181353198 and 23182166432) partly overlap in content. Structural limitation from multiple triggers on the same thread.

Sessions analyzed

Run Workflow Branch/Trigger Conclusion
23182731689 claude-review fix/issue-1572-trash-dir Clean
23182468426 claude-review nightly/clean-23181835484 Clean
23182191893 claude-review fix/issue-1572-trash-dir Thread resolution error
23182037455 claude-review fix/copy-ignored-post-create-example Clean
23182671268 claude-mention issue_comment Clean (silent exit)
23182274999 claude-mention issue_comment Clean (silent exit)
23182166432 claude-mention issue_comment Clean
23181624794 claude-mention issue_comment Clean (silent exit)
23181510462 claude-mention issue_comment Clean (silent exit)
23181353198 claude-mention issue_comment Verbose but correct
23181459573 claude-issue-triage issue #1578 Clean

🤖 Generated with Claude Code

The review bot incorrectly resolved its own technically-correct suggestion
on PR #1583. It had correctly identified that linked worktrees can be on
different mount points (EXDEV on rename), but in a later incremental
review run it accepted the author's less accurate doc comment claiming
".git/ is always on the same filesystem" and resolved the thread.

Add guidance to Step 6 (thread resolution) requiring:
- Verification that the substance was addressed, not just reworded
- Extra skepticism on self-authored PRs where the bot is both author
  and reviewer, creating a bias toward accepting its own code's claims

Evidence: run 23182191893, PR #1583, session e2cae4a2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@worktrunk-bot worktrunk-bot added the claude-behavior Issues with Claude CI bot behavior label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-behavior Issues with Claude CI bot behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant