$ cat ~/map/pi-coding-agent-action.md
pi-coding-agent-action
GitHub Action that runs the pi coding agent in CI for comment-driven reviews, audits, and PR triage.
tools✓ Oct 16
Facts
- GitHub Stars
- ★ 76
- Forks
- 21
- license
- MIT
- npm / mo
- —
- last push
- Oct 15, 2026
install
uses: shaftoe/pi-coding-agent-action@v2## TL;DR
GitHub Action that runs the pi coding agent in CI — works on GitHub, Codeberg, and self-hosted Forgejo — covering /pi comment triggers, scheduled audits, automated PR reviews, and pi-style session share links.
## Key points
- $Interactive mode: prefix any issue or PR comment with /pi to have the agent analyze, report, or open a PR with the fix. Non-interactive mode runs a fixed prompt input as a workflow step; pr_number with workflow_dispatch reviews any PR on demand; the schedule trigger handles recurring maintenance such as dependency audits and doc syncs; assignment events route work to a bot account.
- $Required inputs are github_token, provider, and model; token supplies the provider API key. Optional inputs include base_url (proxies and OpenAI-compatible gateways), thinking_level, extensions (npm:, git:, or local paths), loaded_tools to restrict the tool set, auto_compaction, and diff_max_bytes / diff_max_lines.
- $Session sharing replicates pi's /share command in CI: export_session_html and export_session_jsonl emit workflow artifacts, and share_session uploads the exported HTML to a gist — GitHub Gists by default, or a self-hosted Opengist — and surfaces a shareable viewer link.
- $Platform support via the platform input: github (default), codeberg, forgejo, or gitea — no longer auto-detected; server_url fixes user-facing links when the runner advertises an internally reachable host.
- $Security posture: because CI has no interactive user, the action always marks the workspace as trusted (projectTrusted: true), so anyone with push access can influence the agent through AGENTS.md and .pi/ config; GitHub's GITHUB_TOKEN can never push changes under .github/workflows/ (use a PAT with the workflow scope); release tags are immutable, so pinning @v2.27.1 is equivalent to pinning a commit SHA.
- $Prerequisites: Node.js >= 22.x via actions/setup-node. The action is bundled into a single dist/index.js via esbuild, so no node_modules are needed at runtime, and the Pi SDK and dependencies are updated regularly.
## FAQ
Q How do I pin a version?
Pin the release tag, e.g. uses: shaftoe/pi-coding-agent-action@v2.27.1 — GitHub immutable releases make a tag functionally equivalent to a commit hash; the v2 branch is the stable line and develop is in constant development.
Q Why can't the agent update my workflow files?
GitHub's automatic GITHUB_TOKEN is never allowed to create or modify files under .github/workflows/, even with contents: write — if Pi must open PRs touching them, provide a Personal Access Token with the workflow scope instead.
## References
## Related entries
$ aft
Sensorimotor-cortex layer that ships thin adapters for Pi and OpenCode, replacing raw read/write/edit/bash with semantic operations.
$ pi-tmux-orchestrator
Pi extension + dependency-free Python CLI for coordinating implementer, reviewer, and optional probe agents in a monitorable tmux grid with a per-run Unix-socket broker.
$ pi-conversation-timer
Statusline timer that counts only active task seconds, frozen while pi waits, with a /chat-time stats popup.
Last updated: Aug 31, 2026