GitDB Action
Run one command at a commit of your repository on a GitDB compute machine — how a job runs, what it costs in credits, the plan limits, and how your agent starts, checks, and cancels jobs.
GitDB Action runs hosted compute jobs: your agent picks a commit of a repository, an image, and one command, and GitDB runs that command at that commit on a GitDB compute machine. The job is paid from your agent-ops credits for the time it runs.
Your agent starts, checks, and cancels jobs with three MCP tools — gitdb_action_start,
gitdb_action_status, and gitdb_action_cancel (see MCP tools).
Before your first job
A job is started only when all of these hold for the organization that owns the repository (for your own repositories, your personal account):
- Its plan includes hosted compute. The Pro, Max, and Ultra plans and the Team license include
it; the free plan doesn't. On a plan without it, your agent's tool list leaves the three tools out,
and a call to one is refused with
tier_feature_required. - Hosted compute is switched on, with its disclosure accepted. An owner or admin of the organization switches hosted compute on in the organization's Settings → Hosted compute, and accepting the hosted compute disclosure is part of switching it on. If the disclosure changes, an owner or admin accepts the new disclosure before more jobs are started. Switching hosted compute off stops new jobs from being admitted for the organization; jobs already admitted — queued, assigned or running — still finish and are charged for the time they use. Cancel a job to stop it.
- Credit spending is on, and the organization's credit balance covers the job's hold (see What a job costs). Spending is the Use credits when my window runs out switch (Use credits when a seat's window runs out for an organization with a Team license): for your own repositories it's in Settings → Billing → Credits, and for an organization it's in the organization's Settings → Credits, which only its owner can use — see Agent-ops credits. Turning spending off stops new jobs from being admitted; jobs already admitted — queued, assigned or running — still finish and are charged for the time they use.
- Hosted compute is available on GitDB. While it isn't, a start is refused with
feature_disabled.
Who can do what:
- Start a job: a member of the organization who can write to the repository, with a token that
has
repo:write. - Check a job: anyone who can read the job's repository, with a token that has
repo:read. - Cancel a job: anyone who can start jobs in the job's repository, or an owner or admin of the
organization, with a token that has
repo:write.
How a job runs
A job runs one command in one image, at one commit:
- The image is one of GitDB's job images. An image that isn't on GitDB's list is refused with
bad_request, and nothing is started. - The commit is a full commit id (40 or 64 lowercase hex characters), reached through a ref you
name, such as
refs/heads/main. The machine fetches that ref into a fresh directory and checks the commit out. If the fetch fails, or the commit isn't reachable from the ref, the job ends without running your command, and itsfailure_reasonsays why. - The command runs with
/bin/sh -cinside the image, in the directory that holds the checkout (/workspace). - The size is the job's
vcpu(virtual CPUs),memory_gb(memory in GB), andmax_seconds(the longest it may run), each 1 or more.
Each job runs in its own container, with no network access in either direction — for security, a job can't reach the internet, other systems, or GitDB, and nothing can connect to it. A job can't download anything while it runs (no package installs from the network), so everything it needs must be in the repository or the image. The machine fetches the commit with a credential made for that job alone: it's read-only, reaches only the job's repository, can't push, and can't use Git LFS. It stops working when the job ends.
A job moves through these states:
| State | Meaning |
|---|---|
queued | Started and waiting for a machine. |
assigned | A machine has picked it up. |
running | The machine has started it. |
cancelling | A cancel arrived while it was running; the machine stops it at its next check-in. |
finished | It ended and its machine reported the end; exit_code and failure_reason say how. |
failed | GitDB ended it — for example, its machine stopped responding. |
cancelled | It was cancelled before it started. |
finished, failed, and cancelled are final.
What a job costs
Jobs are paid from the organization's prepaid credit balance, in thousandths of a credit.
- Units. A job's size is counted in compute units: its
vcpu, or itsmemory_gbdivided by GitDB's memory per unit and rounded up, whichever is larger. The units are fixed when you start the job. - Price. The price per unit-hour is fixed when you start the job; a later price change never
reaches a job already started.
gitdb_action_statusshows the price a job was given. - Hold. When you start a job, GitDB holds the most it can cost: its units for its full
max_seconds, at its price. The balance must cover this hold on top of the holds of the organization's other open jobs, or the start is refused withplan_limit. The hold is released when the job ends. - Charge. When the job ends, it's charged for the time it ran — from when its machine started
it, fetching the commit included — in whole seconds, at least one second, and never more than its
own
max_seconds, so the charge is never more than its hold. The charge is rounded up to the next thousandth of a credit. - Never started, never charged. A job cancelled while
queuedorassignedis charged nothing. A running job you cancel is charged for the time it ran.
gitdb_action_status shows a job's units, its hold_micro and charged_micro (in thousandths of
a credit; charged_micro is 0 until the job is charged), and its price.
Each call to the three tools also counts as one standard tool call, like any other standard tool.
Plan limits
Your plan sets three limits on jobs:
- how many jobs the organization can have open (not yet
finished,failed, orcancelled) at once, - the most compute units one job can use, and
- the longest
max_secondsone job can ask for.
A start over any of them, or one the credit balance can't cover, is refused with plan_limit, and
nothing is started.
Start, check, and cancel a job
- Start with
gitdb_action_start: passcommit_sha,git_ref,image_ref,command,vcpu,memory_gb, andmax_seconds. The job runs in the connected repository, or in the one you name withrepo. The answer is the new job'sjob_id(job_followed by 16 lowercase hex characters) and itsstate,queued. Each call starts a new job: a start that times out may or may not have started one, so don't simply call it again. - Check with
gitdb_action_statusand thejob_id: it answers the job's request, size, state, hold, charge, price, start and finish times (Unix milliseconds, 0 = not yet),exit_code,failure_reason, andoutput_bytes(how much output the job produced). The output itself is stored with the repository and deleted with it; anyone who can read the job's repository can read it back through the REST API, piece by piece, with a token that hasrepo:read. - Cancel with
gitdb_action_canceland thejob_id. Aqueuedorassignedjob is cancelled at once and charged nothing; arunningjob moves tocancellingand stops at its machine's next check-in. A job that is already cancelling or has ended is refused withconflict.
Each tool's arguments, answer, and refusals are listed under GitDB Action in the MCP tools reference.
AST indexing
Index a repository's code structure so agents can search it by symbol and by meaning — what data is shared, how consent works, manual versus automatic indexing, and what each status means.
Billing and plans
GitDB plans and prices, the Team license for organizations and its 7-day trial, the 7-day Pro trial, how to subscribe and manage your subscription, fast calls and premium ops per 5-hour window, agent-ops credits, and what happens when you hit a rate limit.