diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index a62af98..4070647 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -40,14 +40,15 @@ jobs: - name: Run Claude Code Review uses: anthropics/claude-code-action@v1 + env: + # CI ends the run when Claude's turn ends, so a background subagent is + # killed before it reports back (anthropics/claude-code#94392) + CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1' with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' show_full_output: ${{ inputs.show_full_output == true }} - # CI ends the run when Claude's turn ends, so a subagent left running - # in the background is killed before it reports back - prompt: | - /code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number || inputs.pr_number }} --comment - - This runs non-interactively: launch every subagent in the foreground (run_in_background: false) and wait for its result. Do not end your turn until the review is posted. + # the inline-comment MCP server only starts when it is allowed here + claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment"' + prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number || inputs.pr_number }}'