$ recombobulate _
home / tips / pass-cli-flags-to-claude-in-github-actions-with-claude-args
0

Pass CLI Flags to Claude in GitHub Actions with claude_args

bagwaa @bagwaa · Mar 26, 2026 · Workflows
pass-cli-flags-to-claude-in-github-actions-with-claude-args

The GA v1 release of Claude Code GitHub Actions consolidated a bunch of separate inputs into a single claude_args parameter. If you've been trying to figure out where max_turns or model went, this is it.

- uses: anthropics/claude-code-action@v1
  with:
    anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
    prompt: "Review this PR for security issues"
    claude_args: |
      --max-turns 10
      --model claude-sonnet-4-6
      --append-system-prompt "Follow our coding standards"

Any flag you'd normally pass to the claude CLI works here. Common ones include --max-turns to cap iterations, --model to pick a specific model, --allowedTools to restrict tool access, and --mcp-config to load MCP servers.

If you're migrating from the beta, the old custom_instructions, max_turns, and model inputs are gone. They all live in claude_args now:

# Old beta style (no longer works)
max_turns: "10"
model: "claude-sonnet-4-6"

# New v1 style
claude_args: "--max-turns 10 --model claude-sonnet-4-6"

One string to rule them all, and in the workflow bind them.


via Claude Code Docs — GitHub Actions

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago