GitHub Actions Foundations for Unattended Claude Code Runs: Triggers, Permissions, OIDC, Timeouts, and Concurrency

Every GitHub Actions primitive is the automated substitute for a human's presence, so when nobody's at the keyboard you must declare a tight timeout-minutes (the default is a six-hour burn) and an explicit permissions block. We walk the full workflow anatomy, triggers, secrets, GITHUB_TOKEN scopes, and end-to-end AWS OIDC auth for a Claude Code run.

Episode page & show notes

Try a walking desk - stay healthy & sharp while you learn & code

Act III opens with the CI plumbing under every headless Claude Code run. The frame: each GitHub Actions primitive covers a failure mode a human would otherwise handle live. Claude Code GitHub Actions is built on the Claude Agent SDK and runs on GitHub's own runners.

News

  • Claude Code CLI v2.1.204 (Jul 8): single-change release fixing hook events not streaming during SessionStart hooks in headless sessions, which could idle-reap remote workers mid-hook. Safe to keep heavier SessionStart hooks again. (changelog, Releasebot)
  • claude-code-action v1.0.166 (Jul 6): drop buffered inline comment when posted live (#1412), modern noreply co-author email (#1369), symlinked CLAUDE.md config snapshot (#1441), preserve repeated --add-dir (#1256), propagate curl install failures (#1241). (release notes)
  • CLI v2.1.202 (Jul 6): Dynamic workflow size in /config; workflow.run_id / workflow.name OpenTelemetry attributes; /review back to single-pass, multi-agent moved to /code-review.
  • CLI v2.1.200 (Jul 3): default permission mode now labeled "Manual" — set an explicit --permission-mode in CI.

Tutorial: GitHub Actions foundations Workflow anatomy (on, permissions, jobs, runs-on, steps). Triggers: workflow_dispatch, schedule/cron (UTC, 5-min min, default-branch only, 60-day public auto-disable), repository_dispatch, issues/pull_request (synchronize), workflow_call. Jobs run in isolated VMs — matrix, needs, if, and outputs pass state. Secrets vs variables vs environment secrets. The Feb 2023 read-only GITHUB_TOKEN shift and the permissions: allowlist (unlisted scopes become none; id-token: write required for OIDC). Full AWS OIDC auth with the sub-claim security lever. Concurrency groups, timeout-minutes (360-min default), and caching. Pitfalls: GITHUB_TOKEN can't trigger downstream CI, silent 403s, pull_request_target injection, the 6-hour burn, fork PRs lack secrets, OIDC sub mismatch, and silently disabled crons. Pin actions to full SHAs.