anthropics / anthropics/claude-code-action

exclude_comments_by_actor does not filter issue comments (top-level), only review comments

Open
#1,360 1 comment 0 reactions 0 assignees View on GitHub
bug p2
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

## Bug

`exclude_comments_by_actor: '*[bot]'` filters review thread comments from the prompt context but does **not** filter top-level issue comments (posted via `issues/comments` API). Since `claude-code-action` posts its reviews as issue comments (not review threads), the prior review's full text is included in the next run's prompt — causing the model to re-report already-fixed findings as "still unresolved" without re-reading the actual files.

## Reproduction

1. Configure workflow with `exclude_comments_by_actor: '*[bot]'`
2. Push commit A → action runs, posts review as an issue comment with findings
3. Push commit B (which fixes the findings) → action runs again
4. Second run's prompt includes the first review's issue comment verbatim
5. Model treats prior findings as carry-overs and reports them as "still unresolved" — even though the files are fixed in the working tree

## Evidence

PR [InFluxStudioCo/influxstudio#2401](https://github.com/InFluxStudioCo/influxstudio/pull/2401):

- Run 1 (commit `404c58b7`): posted review with 3 critical findings
- Run 2 (commit `8d6997ed`): re-reported all 3 as "❌ Still Unresolved" despite `grep` confirming zero remaining occurrences of the old patterns in the actual files

The actor is `claude[bot]` — matches the `*[bot]` glob. The comments are issue comments (confirmed via `gh api repos/.../issues/2401/comments`), not review comments (`gh api repos/.../pulls/2401/reviews` returns empty).

## Expected behavior

`exclude_comments_by_actor` should filter **both** issue comments and review comments from the prompt context. The action posts its own reviews as issue comments, so excluding only review comments creates a self-poisoning loop where each run's findings become immutable carry-overs in subsequent runs.

## Workaround

Adding explicit prompt language: _"Re-verify all findings against actual file contents before reporting them as unresolved. Do not trust prior review text as ground truth."_ — partially mitigates, but doesn't solve the context-bloat cost of including stale review text.

## Ref

Comment in our workflow referencing this gap: `anthropics/claude-code-action#590`

Contributor guide

Open the contributing guide

Research direction

Trace exclude_comments_by_actor through the comment collection entry points for the issues/comments and pulls/reviews APIs. Reproduce the two-run scenario described in the issue, then verify that actors matching *[bot] are excluded from both issue comments and review comments while other comments remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.