Summary
Setting mode: agent (per the action.yml description: "agent (for automation with no trigger checking)") does not actually bypass trigger detection in the @beta tag. The action's prepare phase still runs trigger detection, finds nothing, logs "No trigger found, skipping remaining steps", and exits with success (job ~18s) without invoking Claude.
Reproduction
Workflow on a private monorepo, triggered by pull_request event:
name: AI Code Review
on:
pull_request:
types: [opened, synchronize]
paths:
- 'packages/**'
permissions:
contents: read
pull-requests: write
issues: write
actions: read
jobs:
review:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: AI Code Review
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }} # explicit, to bypass OIDC validation
mode: agent # ← supposed to skip trigger detection
model: claude-opus-4-6
allowed_tools: "Bash,Read,Grep,Glob,Task"
direct_prompt: |
# ... ~2KB inline prompt with concrete instructions ...
Observed
Job log:
Using provided GITHUB_TOKEN for authentication
Checking permissions for actor: <user>
Permission level retrieved: admin
Actor has write access: admin
No trigger found, skipping remaining steps
Job exits successful in ~18 seconds. Claude never runs. No PR comment posted.
Expected
Per the input description in action.yml:
mode: Execution mode for the action. Valid modes: 'tag' (default - triggered by mentions/assignments), 'agent' (for automation with no trigger checking), 'experimental-review' (...)
I expected mode: agent to bypass the trigger phrase / label / mention detection entirely and execute Claude unconditionally. Instead, trigger detection still runs and (correctly) finds no @claude mention or claude label, then exits.
Workaround
Removing mode: agent and relying on direct_prompt's own bypass behavior (per its description: "Direct instruction for Claude (bypasses normal trigger detection)") works:
- name: AI Code Review
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# no mode: agent
model: claude-opus-4-6
allowed_tools: "Bash,Read,Grep,Glob,Task"
direct_prompt: |
# ... same prompt ...
With this, the action correctly invokes Claude (~5min run, full PR review). So either:
- (a)
mode: agent has a regression in the beta tag that broke its bypass logic, or
- (b)
direct_prompt's bypass and mode: agent's bypass are mutually exclusive in some unexpected way, or
- (c) The action.yml description for
mode is misleading and agent mode requires additional configuration not documented.
Environment
- Action:
anthropics/claude-code-action@beta
- Trigger event:
pull_request (types: opened, synchronize)
- Repo: private monorepo
- Date: 2026-04-08
- Anthropic model:
claude-opus-4-6
Suggestion
Either (1) fix mode: agent to actually bypass trigger detection as documented, or (2) update the action.yml description to clarify that direct_prompt is the canonical bypass mechanism and mode: agent requires X/Y/Z additional setup. The current state is a footgun: the docs read as if mode: agent is the right choice for non-mention-driven automation, but it silently no-ops.
Summary
Setting
mode: agent(per the action.yml description: "agent (for automation with no trigger checking)") does not actually bypass trigger detection in the@betatag. The action's prepare phase still runs trigger detection, finds nothing, logs"No trigger found, skipping remaining steps", and exits with success (job ~18s) without invoking Claude.Reproduction
Workflow on a private monorepo, triggered by
pull_requestevent:Observed
Job log:
Job exits successful in ~18 seconds. Claude never runs. No PR comment posted.
Expected
Per the input description in
action.yml:I expected
mode: agentto bypass the trigger phrase / label / mention detection entirely and execute Claude unconditionally. Instead, trigger detection still runs and (correctly) finds no@claudemention orclaudelabel, then exits.Workaround
Removing
mode: agentand relying ondirect_prompt's own bypass behavior (per its description: "Direct instruction for Claude (bypasses normal trigger detection)") works:With this, the action correctly invokes Claude (~5min run, full PR review). So either:
mode: agenthas a regression in the beta tag that broke its bypass logic, ordirect_prompt's bypass andmode: agent's bypass are mutually exclusive in some unexpected way, ormodeis misleading andagentmode requires additional configuration not documented.Environment
anthropics/claude-code-action@betapull_request(types: opened, synchronize)claude-opus-4-6Suggestion
Either (1) fix
mode: agentto actually bypass trigger detection as documented, or (2) update the action.yml description to clarify thatdirect_promptis the canonical bypass mechanism andmode: agentrequires X/Y/Z additional setup. The current state is a footgun: the docs read as ifmode: agentis the right choice for non-mention-driven automation, but it silently no-ops.