Agent runners
A runner starts Claude Code, Codex or Gemini CLI on a machine you control, so every push is read by an agent in context and findings can be fixed with a pull request.
What a runner is
You push code
GitHub tells Dantai. The push is queued and checked against your project's agent settings.
Your runner picks up the job
The runner asks the server for work every few seconds. It only makes outbound connections, so there is no port to open and no address to expose.
An agent works in a throwaway copy
The runner checks out the pushed commit in its own folder and starts the CLI there. A scan is read-only. A fix may edit files and run your tests.
The result comes back
Findings become board tasks. For a fix, the runner commits to a
pentava/fix-…branch, opens a pull request and attaches the evidence. People review and merge: nothing is merged for you.
Install and start
You need Node 20 or newer, git, and at least one of Claude Code, Codex or Gemini CLI, logged in as the user who runs the runner. Create the token under Agents → Agent runners → Add a runner: it appears once, and only its hash is stored.
export PENTAVA_URL='https://your-pocketbase.example.com' export PENTAVA_RUNNER_TOKEN='sar_...' # Optional: only fix jobs need it (a GitHub token that can push branches and open pull requests) # export PENTAVA_GITHUB_TOKEN=... node runner/bin/pentava-runner.mjs run
The runner folder has no dependencies, so run these from any checkout of the repository. Replace the address and token with your own: the app shows both ready to copy when you add a runner.
Check everything before the first run
Verifies your settings, git, the agent CLIs and that the server accepts the token.
node runner/bin/pentava-runner.mjs doctorTest one CLI against the real thing
Runs a tiny prompt through Codex or Gemini and says what failed. Their adapters were written to the documented interfaces, so do this once.
node runner/bin/pentava-runner.mjs doctor --provider codexnode runner/bin/pentava-runner.mjs doctor --provider gemini
Settings
All settings are environment variables. Only the first two are required.
| Variable | Meaning |
|---|---|
| PENTAVA_URL | Your PocketBase address. Required. |
| PENTAVA_RUNNER_TOKEN | The sar_… token from the app. Required. |
| PENTAVA_GITHUB_TOKEN | Optional fallback GitHub token. Also read from GITHUB_TOKEN or GH_TOKEN. See below. |
| PENTAVA_GIT_URL | Clone address template, default https://github.com/{repo}.git. Use git@github.com:{repo}.git if the machine has a deploy key. |
| PENTAVA_WORKDIR | Where repositories and job folders are kept. Default ~/.pentava-runner. |
| PENTAVA_CONCURRENCY | Jobs at once, 1 to 4. Default 1. |
| PENTAVA_POLL_MS | How often to ask for work. Default 5000. |
| PENTAVA_CLAUDE_BIN, _CODEX_BIN, _GEMINI_BIN | A different command for a CLI, for example wsl codex. |
| PENTAVA_CLAUDE_MODEL, _CODEX_MODEL, _GEMINI_MODEL | The model to ask each CLI for. Default: the CLI's own. |
| PENTAVA_MAX_BUDGET_USD | Spending cap per Claude Code run. |
| PENTAVA_GITHUB_API | Only for GitHub Enterprise. Default https://api.github.com. |
The GitHub token
Pushing a branch and opening a pull request needs a GitHub token. The runner picks one in this order:
- 1. The token saved on the site. Integrations → GitHub. Used for every job, for that job only, and never shown to the agent.
- 2. The runner's own token.
PENTAVA_GITHUB_TOKEN, used only when the site has none saved.
Who can do what
| Action | Who |
|---|---|
| Add or remove a runner | Workspace owner, head of development |
| Switch a project's agent on or off | Workspace owner, the project's manager |
| Ask an agent to fix a finding or do a board task | Anyone who can see the project |
| Cancel or re-run a job | Owner, the project's manager, team heads |
Limits
Task and fix jobs are counted together, per workspace, per calendar month (UTC). Push scans count against your normal scan quota. Agents use the account of the machine they run on, so the model cost is yours.
| Plan | Agent jobs per month |
|---|---|
| Pro | 200 |
| Team | 1,000 |
| Enterprise | No limit |
The month's count shows on the Agent runners card. Set PENTAVA_MAX_BUDGET_USD to cap each Claude Code run.
Safety
Everything an agent reads (code, comments, commit messages, tickets) is treated as untrusted. The defences are layered:
- IsolatedEach job runs in its own folder. The runner and GitHub tokens are withheld from the agent's environment.
- Least privilegeA scan is read-only. A fix can edit files and run your tests, but never push, commit, curl or ssh.
- The runner does the pushingIt commits and pushes only to pentava/ branches with its own token, and never merges.
- Guarded changesA fix touching CI config, credentials or .git, changing nothing, or changing more than 25 files is refused.
- Job-scoped tokensThe agent's tools use a token that works for one running job and dies with it.
- Review as usualTreat pull requests like any other. The defences reduce risk; they do not remove it.
Troubleshooting
| What you see | What to do |
|---|---|
| “No runner online” | Check the process is running, run doctor, and confirm the runner was not removed on the Agents page. |
| “The server refused this runner's token” | The token was revoked or mistyped. Add a new runner and use its token. |
| 403 “Write access to repository not granted” | The GitHub token cannot push. Save a token with write access under Integrations → GitHub. |
| “No GitHub token is available” | Save one under Integrations → GitHub, or set PENTAVA_GITHUB_TOKEN on the runner. |
| A private repository never starts | Git never asks for a password. Give it a token that can read the repository. |
| A fix says its tests were not run | The project's dependencies are not installed in the job's folder. Install them there, then re-run the job. |
| Codex or Gemini fail to start | Run doctor --provider with that name. On Windows, point PENTAVA_<NAME>_BIN at the real entry point or run the runner inside WSL. |
