Skip to content

Issue comment workflow: Claude runs but doesn't post comments to issues #891

@AntoineMontane

Description

@AntoineMontane

Description

When using claude-code-action with issue events (not PR events), Claude runs successfully and generates results, but comments are not posted back to the issue.

Workflow Configuration

name: claude-issue

on:
  issues:
    types: [opened, edited]
  issue_comment:
    types: [created, edited]

jobs:
  claude-issue:
    runs-on: ubuntu-latest
    if: github.actor \!= 'github-actions[bot]' && github.actor \!= 'claude[bot]'
    permissions:
      contents: write
      issues: write
      pull-requests: write
      id-token: write

    steps:
      - uses: actions/checkout@v4
      - uses: anthropics/claude-code-action@v1
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          prompt: |
            You are a feature assistant...
            [detailed prompt here]

Observed Behavior

  1. Workflow triggers correctly on issue creation/comments
  2. Claude runs and analyzes the codebase (visible in run logs)
  3. Claude produces a result with analysis/recommendations
  4. Result is NOT posted as a comment on the issue
  5. Result only appears in the GitHub Actions run summary

Expected Behavior

Claude's response should be automatically posted as a comment on the issue, similar to how it works for PR reviews.

Logs

Run logs show:

  • Auto-detected mode: agent for event: issue_comment
  • Claude's result is captured in the output JSON
  • No GitHub API calls to create comments visible

Tested Configurations

Tried various configurations:

  • With/without trigger_phrase: ""
  • With/without --allowedTools restrictions
  • With @claude mention in comment

All result in the same behavior: Claude runs but doesn't post comments.

Environment

  • claude-code-action version: v1 (latest)
  • Runner: ubuntu-latest

Questions

  1. Is comment posting on issues supported, or only for PRs?
  2. Is there a specific configuration needed to enable comment posting?
  3. Should this be filed as a bug or feature request?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationbugSomething isn't workingp2Non-showstopper bug or popular feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions