The Docker Agent is an ephemeral container that clones a job branch, executes the task autonomously, commits results, and creates a pull request. Each job runs in complete isolation with its own environment, preventing state leakage between tasks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/stephengpope/thepopebot/llms.txt
Use this file to discover all available pages before exploring further.
Agent Backends
The Pope Bot supports two agent backends:Pi Coding Agent
Third-party agent by @mariozechner. Supports multiple LLM providers (Anthropic, OpenAI, Google, custom/local). Uses custom skills system.
Claude Code CLI
Anthropic’s official coding agent. Anthropic models only. Built-in tools (Read, Edit, Bash, Glob, Grep, WebSearch, WebFetch) + MCP support.
Comparison Table
| Feature | Pi Coding Agent | Claude Code CLI |
|---|---|---|
| LLM Providers | Anthropic, OpenAI, Google, custom/local | Anthropic only |
| Tools | Custom skills (brave-search, browser-tools, etc.) | Built-in + MCP |
| Auth | API key (pay-per-token) | OAuth token (subscription) or API key |
| Billing | API credits | Pro/Max subscription or API credits |
| Choose when | Non-Anthropic LLMs, custom Pi skills | Subscription billing, official Anthropic tooling |
Switching Backends
The
AGENT_BACKEND variable is stored in GitHub repository variables and read by run-job.yml to select the correct Docker image.Docker Images
All images are taggedstephengpope/thepopebot:{tag}-{version}:
| Image | Backend | Purpose |
|---|---|---|
pi-coding-agent-job | Pi | Runs Pi agent for job execution |
claude-code-job | Claude Code | Runs Claude Code CLI for job execution |
- Node.js 22
- Git + GitHub CLI
- Agent binary (Pi or Claude Code)
- Puppeteer + Chromium (for browser-tools skill)
Container Lifecycle
Whenrun-job.yml triggers, the container:
1. Environment Setup
Export secrets as environment variables
Protected secrets (LLM-accessible secrets (
AGENT_*) - Filtered from LLM’s bash subprocess:AGENT_LLM_*) - Available to skills:2. Skill Preparation
3. System Prompt Construction
The container builds the agent’s system prompt from config files:4. Job Execution
The container reads job metadata fromjob.config.json and runs the agent:
5. Commit Strategy
The container commits based on agent exit code:6. Pull Request Creation
Remove logs from branch
Logs are removed so they don’t merge into main (they’re preserved in the log commit):
Environment Variables
Passed to the container byrun-job.yml:
| Variable | Description | Source |
|---|---|---|
REPO_URL | Repository clone URL | ${{ github.server_url }}/${{ github.repository }}.git |
BRANCH | Job branch name | ${{ github.ref_name }} (e.g., job/550e8400-e29b...) |
SECRETS | Protected credentials (JSON) | AGENT_* GitHub secrets (filtered from LLM) |
LLM_SECRETS | LLM-accessible credentials (JSON) | AGENT_LLM_* GitHub secrets |
LLM_PROVIDER | LLM provider | job.config.json override or GitHub variable |
LLM_MODEL | LLM model | job.config.json override or GitHub variable |
OPENAI_BASE_URL | Custom provider base URL | GitHub variable |
AGENT_BACKEND | Agent backend (pi or claude-code) | job.config.json override or GitHub variable |
Secret Filtering
Protected secrets (AGENT_*) are filtered from the agent’s bash environment using Pi’s env-sanitizer extension:
env or echo $GH_TOKEN.
Custom LLM Providers
For OpenAI-compatible endpoints (Ollama, local models, etc.), setLLM_PROVIDER=custom and OPENAI_BASE_URL:
Claude Code OAuth Token
Claude Pro (100+/mo) subscribers can use a 1-year OAuth token instead of API credits:Anthropic only allows OAuth tokens with Claude Code, not the Messages API. Your API key is still required for event handler web chat. Pro users may hit usage limits sooner since limits are shared with Claude.ai.
Session Logs
Each job creates a directory atlogs/{JOB_ID}/ containing:
job.config.json- Job metadata (title, description, LLM overrides)session-*.jsonl- Agent session logs (messages, tool calls, responses)
Next Steps
Skills System
Extend your agent with custom skills and tools
Architecture
Review the complete architecture and job lifecycle