hammerkit

Runs

Submit runs of published build files, wait for them, read how each task went and search their logs, upload source files, and the limits and environment runs execute with.

A run is a request to execute tasks of a published build file. The server writes every run down in storage (records/, readable by the user of the server only), so a restart keeps them with their logs, see Limits and restarts. Every call needs a token, and a run can be seen and cancelled only by the caller that submitted it: for anyone else its id is 404, the same as an id that does not exist. Who decides about it, and who may open a service run's endpoints, see it too; with observe a caller sees every run in lists, see Who sees what.

From the command line, remote approvals lists the runs that wait for you. Submitting a run from the command line (remote run, --on) is not there yet; a run is a POST /v1/runs.

Submitting a run

CallWhat it does
POST /v1/runsSubmit a run. Answers 202 with the run in state queued, or awaiting-approval when the caller only has the account on request.
GET /v1/runsThe caller's runs, newest first, without the results of their tasks.
GET /v1/runs/<id>One run: state is awaiting-approval, queued, running, succeeded, failed, cancelled or rejected; a failed or rejected run has an error. results says how each task went, and ?wait=30s answers once the run is over, see Results and waiting.
POST /v1/runs/<id>/cancelCancel a run: one that is queued or waits for an approval at once, a running one when its tasks have stopped.
POST /v1/runs/<id>/retryStart a run that is over again, as a new run of yours, see Retrying a run.
GET /v1/runs/<id>/eventsThe run's events as server-sent events, see Events.
GET /v1/runs/<id>/logsThe run's output as numbered lines, with a tail, a range and a search, see Logs.
{
  "definition": "sha256:9f2c...",
  "tasks": ["build", "test"],
  "source": { "type": "ref", "repo": "github.com/corp/payments", "ref": "main" },
  "options": { "env": "staging", "cache": "checksum", "timeout": "30m" }
}
  • definition is the hash of the published version to run, as remote publish printed it. The run is pinned to it, so what it executes does not change under it. A hash that was not published is 400, a yanked one 409.
  • tasks are task names as on the command line, up to 100. A task the build file does not have is 400. Instead of names, labels in options.filter can select the tasks. The tasks named run as one plan, like those a label selects: side by side as far as their dependencies allow, in no particular order, with the longest remaining chain first. What a task usually takes comes from its last successful runs in the repository. To run one task after another, make it depend on the other.
  • There is no account in the request. The run uses the accounts of the secrets of the tasks it executes, with their dependencies and the services they need, derived from the pinned version, and the answer lists them as accounts. A caller who has no level on one of them gets 403 naming the account, one who may only request it gets a run in awaiting-approval, and a caller without builds level may not run.
  • source says where the code comes from: { "type": "ref", "repo": "github.com/corp/payments", "ref": "main" } for a branch or tag of a repository (or a full commit hash) that the server checks out itself. The server pins the ref to the commit it is at when the run is submitted; with "commit": "4be1a07c..." (the full hash, 40 or 64 hex digits) the ref has to be at that commit, else the run is refused with 409 (main is at 9e1f... now, not at 4be1a07c...), so a CI job runs the commit it was started for and not one pushed after it. Or { "type": "upload", "snapshot": "sha256:..." } for the caller's working tree, announced and sent beforehand, see Source files, or { "type": "sandbox", "id": "sbx_..." } for a sandbox of the caller's. A snapshot that is unknown, or that still lacks files, and a sandbox that is not the caller's, are 400. The kinds the accounts of the run list in source (and, for refs, the branches) are the only ones allowed, anything else is 403.
  • options are the settings of hammerkit run that make sense on a server, all optional: env, filter and exclude (labels), cache (checksum, modify-date or none), cacheReadOnly, timeout (for example 30m, for tasks without a timeout of their own), maxTimeout (for every task, also one with a longer timeout of its own, see Capping every task) and skipDeps. A run as a whole is still stopped after the server's runs.maxDuration. How many tasks run in parallel and how much of the machine they use stay with the server, and watch and the log mode are for terminals only, so they are not accepted.
  • options.args are arguments, what hammerkit run <task> -- ... passes after --. See Arguments.

The request names the work, it does not contain it: what the tasks do comes from the published build file, and the files they work on come from source. A ref is fetched by the server. An upload refers to a snapshot of the working tree that is sent separately, so the request stays small however large the project is.

The body is JSON up to 64 KiB, and unknown fields are rejected. Each submitted run is logged with who submitted it, the accounts and the source.

What POST /v1/runs answers, in the order the server checks:

StatusWhen
202The run is accepted, queued or awaiting-approval.
400The body is malformed or has unknown fields, the build file or version does not exist, a task is unknown, arguments go to anything but one task that reads no secret or server credential and takes arguments, the repository is not readable by the server or the ref is not one branch or tag, the snapshot is unknown or incomplete, or the sandbox is not the caller's.
401The token is missing or invalid.
403The caller has no builds level, may not run from that repository, has no level on an account of the run, or the account refuses that source or ref. A run on a sandbox also needs its repository and branch in the sandboxes of an entitlement.
409The version was yanked, was published before accounts were recorded, nobody may approve an account the caller can only request, or the ref is no longer at the commit the request names.
413The caller's sandboxes take more than their limit (runs on a sandbox only).
429The caller is over their limits.
501The run is from an upload, which the executor does not support yet.
502The server could not reach the repository to resolve the ref.
503The server is shutting down, or too many runs wait for an approval.

Arguments

A run can pass arguments to one task, as hammerkit run test -- src/login.spec.ts -t "login flow" does locally:

{
  "definition": "sha256:9f2c...",
  "tasks": ["test"],
  "source": { "type": "ref", "repo": "github.com/corp/payments", "ref": "main" },
  "options": { "args": ["src/login.spec.ts", "-t", "login flow"] }
}

They are appended to the last command of that task, each quoted for its shell, so shell syntax in an argument stays text. Its dependencies and the services it needs get none. The run's plan shows the command as it runs, so the caller sees npx vitest run 'src/login.spec.ts' '-t' 'login flow', and a published version shows the last command of each task as command, so a caller knows where the arguments land.

  • tasks names exactly one task; labels can not select it. Several tasks, a service, or only labels with arguments are 400.
  • Up to 100 arguments, 16 KiB together, and none with a NUL character.
  • A run in which any task or service reads a secret, or takes a variable of the server into its envs ($NAME or ${NAME} of runs.env) other than PATH, HOME, CI and the HAMMERKIT_RUN_ variables, passes no arguments. That covers the task itself, its dependencies and the services it needs: an argument could make the command print what the task holds, and what a dependency wrote into its outputs or a service answers, in a form no mask of secrets knows (rev token.txt). The run is 400 naming the item and what it reads, and the executor checks again before it starts. A shell task (cmds: [sh -c]) on a server therefore runs without any account or credential of the server, nor next to one.
  • A task with args: false takes none: the run is 400. With runs.args: declared in the config the server passes arguments only to the tasks that say args: true, any other task is 400 as well. Use it when a published build file holds tasks nobody wrote for arguments: one of them that takes them runs whatever its last command does with what a caller appends, so each would need args: false, and a new task that forgets it takes them again. With declared the build file names the tasks that take them, typically the shell task of agents and a test task, and a reviewer reads args in the plan of each.
  • Such a run never uses an account, so it never waits for an approval.
  • remote approvals still lists the arguments of a run as JSON strings, and remote show prints every command whole, never cut, with control and bidi characters written out.
  • On a server that allows the local runtime, arguments to a local task run as commands on the server's machine, as the code of the ref already does.
  • A server never takes --set; variables stay what the published build file says.

As locally, the task with arguments skips the cache: it reads no cache entry and stores none, and a later run without arguments doesn't take its outputs for a cache hit. Naming a method in options.cache ("cache": "checksum") keeps its caching, as --cache before -- does. Its dependencies cache as always.

Results and waiting

A run says how each of its tasks went in results, by task name, from the moment the task starts. A client reads this first, and only reads the log when the last lines are not enough:

{
  "id": "run_4vJ0mT2cX9qLw1aB",
  "state": "failed",
  "error": "test failed",
  "results": {
    "build": {
      "status": "succeeded",
      "startedAt": "2026-10-12T20:47:14.569Z",
      "finishedAt": "2026-10-12T20:47:14.588Z",
      "durationMs": 42,
      "cache": { "hit": false, "causes": ["source changed: src/index.ts"] },
      "commands": [{ "startedAt": "2026-10-12T20:47:14.571Z", "finishedAt": "2026-10-12T20:47:14.585Z" }],
      "lastLog": ["compiled 12 files"]
    },
    "test": {
      "status": "failed",
      "startedAt": "2026-10-12T20:47:14.589Z",
      "finishedAt": "2026-10-12T20:47:14.616Z",
      "durationMs": 70,
      "exitCode": 1,
      "cache": { "hit": false },
      "lastLog": ["FAIL src/index.spec.ts", "  expected 1 to be 2"]
    }
  }
}
FieldWhat it says
statusrunning, succeeded, failed, cached (taken from the cache, nothing ran), skipped (a dependency no task of the run needed, because every task depending on it was cached) or cancelled (stopped with the run, or never started because another task failed). A task the run names that is checked again as a dependency of a later one keeps what it did the first time.
startedAt, finishedAtWhen the server heard that the task started and ended. A cached task has no startedAt.
durationMsHow long the task took, as the engine measured it.
exitCodeThe exit code of the command that failed.
errorWhy a task failed when no command exited, for example timed out after 30m. Masked like the log, up to 2 KiB.
cachehit: true for a cached task. For a task that ran, causes says why it was not taken from the cache, as --explain would: never cached, source changed: <file>, command changed, no src declared (uncacheable) and so on, at most 20 and then … and N more.
commandsWhen each command of a task that ran started and exited, the first 50, once the task is over: the rest of the task's time went to its container, its caches and, on Kubernetes, the pod's scheduling, image and init containers. Kubernetes gives the times of a pod in seconds. Left out where the runtime does not say, such as for a cached task or a shell in a sandbox.
lastLogThe last 20 lines the task printed, stdout and stderr as they came, the newest last, each cut at 1000 characters. They are kept even when the run's log was cut off, so the end of a long log, where the error usually is, is never lost.

What the run did before its tasks is in phases, in their order, each with its startedAt and finishedAt: source got its files (the checkout of the commit, or those of the sandbox), namespace prepared its place on a Kubernetes cluster, and plan started the process of the run and read its build files. The time after plan until the first task went to the keys of its tasks, computed from their files. A run of an older server has no phases.

"phases": [
  { "phase": "source", "startedAt": "2026-11-14T07:44:16.766Z", "finishedAt": "2026-11-14T07:44:17.916Z" },
  { "phase": "namespace", "startedAt": "2026-11-14T07:44:17.916Z", "finishedAt": "2026-11-14T07:44:18.166Z" },
  { "phase": "plan", "startedAt": "2026-11-14T07:44:18.216Z", "finishedAt": "2026-11-14T07:44:19.416Z" }
]

GET /v1/runs/<id>?wait=30s holds the answer until the run is over (succeeded, failed, cancelled or rejected) or the time is up, and then answers the run as it is. A client that can not keep a stream of events open, such as a tool call of an agent, waits with it and asks again while the run is not over. The wait is a duration like 500ms or 30s (leave wait out not to wait, 0s is not a wait), at most 50 seconds (a longer one is cut to 50 seconds, so the answer comes before a proxy in front of the server closes the quiet connection, which nginx does after 60); anything else is 400. A run that waits for an approval answers when the time is up, or when the server stops.

Retrying a run

POST /v1/runs/<id>/retry (no body), hammerkit remote retry <run> or the retry button on the run's page in the dashboard starts a run that is over (succeeded, failed, cancelled or rejected) again. The new run is yours, whoever started the first one, and names it in retryOf. It asks for what the first one asked for: the same published build file, the same tasks or services, settings and arguments, from the same source.

  • Who may retry it: who may read the run whole, its owner, who decided about it, and observe, since a retry runs its arguments again. may.retry says so on the run.
  • How it is decided: as a run you start yourself. Your entitlements say whether you may run from its repository, which accounts you may use, and whether one needs an approval. Nothing carries over from the first run: an approval it got is not yours, so a retry of a run that needed one waits for one again, and the server resolves its secrets as for any run.
  • What it runs: a run from a branch or tag runs the commit the first one ran. When the branch moved on since, the retry is refused with 409 and says so (for example main moved to <commit> since <run> ran <commit>, start a new run from main): the accounts of a branch never run a commit that is no longer on it. A run on a sandbox runs on the files the sandbox holds now, and only its owner may retry it. A run of uploaded files is not retried.
  • Which tasks: all the tasks the first run named, not only the ones that failed. What passed is taken from the cache, so it costs little, and the run is whole again in one place.
  • A service run starts again with its services, name, endpoints and the ttl and sleepTtl it had, within today's runs.up.maxTtl. While a service run of yours with that name is not over, the retry is refused (409): a new run of the name would replace it and its volumes, so stop it first.

A run that is not over yet is not retried (409): stop it first.

Logs

GET /v1/runs/<id>/logs reads the output of a run as numbered lines, as far as the server kept it. Without parameters it answers the first 200 lines:

{
  "lines": [{ "line": 2, "task": "test", "stream": "stdout", "text": "  expected 1 to be 2", "match": true }],
  "total": 214,
  "next": 3,
  "truncated": false
}
ParameterWhat it does
taskOnly the lines of this task. The lines are numbered from 1 over what task selects, so a later call with the same task reads around a line it found. Without it, every task's lines, and the server's own (hammerkit, the checkout).
tailThe last lines, up to 1000. With grep, the last lines of what it finds: the matches and their context, counted as lines.
fromThe first line to read, by its number. Not together with tail.
limitHow many lines one answer has, up to 1000: 200 by default, or as many as tail asks for. When more follow, next is the from that continues; a match just before from still shows its lines after.
grepOnly lines that contain this text. It is a fixed string, not a regular expression, so a pattern can not keep the server busy. It can not span lines.
itrue to ignore case in grep.
contextLines before and after each match, up to 20, marked "match": false. They are lines of the task asked for; without task, the lines around the match in the whole log, of any task.

total counts the lines task selects, truncated says the log of the run was cut off at runs.maxLogBytes and its end is not kept (the results still have the last lines). An unknown parameter or a value out of range is 400 and says which, a run of somebody else's is 404. A read costs the lines it answers, not the length of the log: the server notes where the lines are once, as the log grows.

An agent that ran the tests reads results.test.lastLog first, then for example ?task=test&grep=FAIL&context=5 to see every failing test with what it printed around it.

Events

The events carry the sequence number as their id, so a client that lost the connection continues with the Last-Event-ID header (or ?after=<n>) and misses nothing. The stream replays what happened and then follows the run until it is over; a finished run's events are replayed and the stream ends. Event types are state (awaiting-approval, queued, running and the final state, with the error of a failed run), approval (who approved or rejected the run), task (a task started or ended, with the state a result has and, once it ended, durationMs, exitCode, error and causes) and log (a line of a task's output). A run that produces more than 5000 events is cut off with one truncated event; the state changes are always kept, and so are the results of the tasks, while their own events are cut off with the log.

Source files

A run from an upload works on the caller's files. They are sent in two steps so that only what the server does not have yet travels: the caller announces the tree as a list of files with their digests, the server says which digests it lacks, and the caller sends those. The server takes the files already, but does not execute runs from an upload yet: such a run is refused with 501.

POST /v1/sources
{
  "files": [
    { "path": "package.json", "sha256": "9f2c...", "size": 812 },
    { "path": "bin/run.sh", "sha256": "41ab...", "size": 233, "mode": "exec" }
  ]
}

The answer names the tree, a snapshot, and says what is missing:

{
  "snapshot": "sha256:5d1e...",
  "files": 2,
  "bytes": 1045,
  "createdAt": "2026-10-11T11:00:00.000Z",
  "missing": ["9f2c...", "41ab..."],
  "complete": false
}

The snapshot is the sha256:<hex> of the JSON [[path, sha-256, mode], ...] with the paths sorted, the same construction as the version of a build file, so the same files have the same name anywhere. It answers 201 for a new tree and 200 for one the server already knows. Then each missing file is sent on its own:

CallWhat it does
POST /v1/sourcesAnnounce a tree. Up to 20,000 files, 32 MiB per file, 1 GiB per tree.
PUT /v1/sources/blobs/<sha256>Send the content of one file as the request body. Answers 201, or 200 when the server had it.
GET /v1/sourcesThe trees the caller keeps, what they take and the limit.
GET /v1/sources/<snapshot>One tree and the digests still missing; complete when none is.
DELETE /v1/sources/<snapshot>Forget a tree and the content no other tree of the caller needs.

A second run after one edited file announces the tree again and sends that file only. A client can also skip the announcement when the snapshot it computes is the one it used last and GET /v1/sources/<snapshot> says it is complete.

  • Only the caller's. Trees and content belong to the caller who sent them; another caller's snapshot is 404. Content is never shared between callers: a server that answers "I already have this file" to anybody would tell them what other people work on.
  • Only announced content. A file is taken only if a tree the caller announced lists its digest, with the size announced, and only if the content has that digest. Anything else is 400.
  • Credentials do not leave. A tree with a path that looks like a credential is refused with 400 that names it, even when a src pattern reaches it: .env (not .env.example, .env.sample, .env.template), .npmrc, .netrc, .pypirc, .git-credentials, private keys (id_rsa and its kin, *.pem, *.p12, *.pfx) and anything below .git/, .ssh/, .aws/, .gnupg/ or .kube/, in any case and under the names Windows also opens (.SSH, .git., GIT~1). Secrets belong in a secret provider; there is no override.
  • Quota. A caller may keep 4 GiB of files, files still being sent included; a file that would go over is 413. A caller may keep 1,000 trees, whose announcements take at most 64 MiB together; a tree over either is 413. Nothing is removed on its own, a caller deletes what they no longer need.
  • Who may. Callers with a builds level; others get 403. An account can further restrict its source.

Paths are relative to the root of the project, forward slashes, nothing that climbs out; inputs of a build file version say which files a run needs.

Executing a run

The server runs the tasks of an accepted run on its own machine, with the same engine as hammerkit run, so the local and docker runtimes and the task cache work as they do there. Each run executes in a process of its own (hammerkit server-run, started by the server):

  1. It fetches the ref of the repository, as pinned to its commit when the run was submitted (see Pinning), into a directory made for the run. A ref that is not a plain branch, tag or commit name is refused.
  2. It writes the files of the published version into a directory of the run that no task mounts, and over the checkout, so the tasks see the published build files whatever the repository says. A file that would land in .git (in any spelling a case-insensitive file system reads as that) or behind a symbolic link of the checkout is refused.
  3. It starts the process of the run in the published files, which it reads every build file from, includes too: a task that writes a build file into the checkout, or a build file of the repository beside an included one, changes nothing of what the run executes. The tasks work in the checkout. It runs the tasks named (or the ones the labels select) as one plan, side by side as far as their dependencies allow, the longest remaining chain first; once one fails it starts no new task and the run fails. It reports each task and its output as events. Cancelling the run tells the process so on its standard input, the same on every platform, so the engine stops its tasks and removes its containers; the process is killed if it is still running after 15 seconds. On Windows the engine stops a local task by ending its shell, so a program the shell started can keep running; the directory it holds is then left and reported (step 4).
  4. It removes the directory, whether the run succeeded, failed or was cancelled. A directory that can't be removed (a file still in use, for example) is left in place and reported in the run's log and the server's log; the run still ends the way it ended.

The process starts with an environment the server builds, not with its own: the variables runs.env.allow lists, plus runs.env.set, and a HOME that is an empty directory of the run's alone. So what the engine reads of its process (the docker host, registry logins in the home directory, cloud credentials) is what the operator gave runs and nothing else; a private registry needs DOCKER_CONFIG in the allowlist, pointing to a login the operator chose for runs. Tasks do not get the environment of the process either, only their own envs and the secrets they declare.

The server also sets what the run is from, which a task or service reads into its envs like any variable of the process:

VariableValue
HAMMERKIT_RUN_REPOthe repository, such as github.com/corp/payments
HAMMERKIT_RUN_REFthe branch or tag the run was submitted for, as given (not set for a commit hash)
HAMMERKIT_RUN_COMMITthe commit the run was pinned to (not on a sandbox, whose files may hold changes)
HAMMERKIT_RUN_SANDBOXthe sandbox of a run on a sandbox
tasks:
  preview:
    envs:
      BRANCH: ${HAMMERKIT_RUN_REF:-local}
    cmds:
      - ./deploy-preview.sh "$BRANCH"

So a task that reads a secret, which takes no arguments on a server, still knows which branch it deploys. They hold no credential: a task that reads them takes arguments and keeps its network as before. The server sets them alone: a config that names one in runs.env doesn't load. Outside a server they are not set, hence the default above.

A ref may hold /, . and upper case and be up to 200 characters long, which is no valid image tag, DNS label or Kubernetes label. Turn it into one in the command, for example the start of its hash: printf %s "$BRANCH" | sha256sum | cut -c1-12.

The plan of a run, which its approver reads, is made with the run's values. A value is part of the task's cache key, so a task that reads HAMMERKIT_RUN_COMMIT runs again for every commit. A task that reads any of them, or depends on one that does, records no check: its result says nothing a CI job's remote verify, which has no run, could look up. Keep them out of the tasks CI verifies.

The task cache is kept below the server's storage directory, one cache for the runs of a repository and one per caller for uploads and for sandboxes. A run from an upload or a sandbox can therefore not leave an entry that a run from a reviewed repository finds. A task is keyed by its definition and its sources, not by where the checkout is.

A run fails with the reason when the server does not list the repository, when the ref can not be fetched or has moved, when it comes from an upload: uploads are not supported by the executor yet, use source: ref. Cancelling a run stops the fetch or the running task.

Before it starts, the executor derives the accounts of the run again from the pinned files with the run's environment, and fails the run if it would use one it was not admitted for. The secrets of the tasks are read as the accounts of the server config, by the provider commands, and a secret of any other account is refused when it is fetched.

A run on a sandbox skips the fetch: the published files are written to a directory of the run, and the process works on the files of the sandbox, which stay when the run is over.

The process of a run is not an isolation boundary, see One server is one trust level.

Limits and restarts

One caller can not take the machine. Per caller (issuer and subject) the server counts the runs that wait for an approval (runs.limits.waiting) and the runs in the queue (runs.limits.queued); a submit over either is answered 429 and says which. At most runs.limits.running runs of one caller execute at the same time, and the next run in the queue whose caller has a place left starts first, so one caller with many runs does not keep the others waiting. On a Kubernetes backend, runs of one caller that share kept claims also run one at a time, see Namespaces. remote status shows the queue, what holds each run in it, and which of your runs count against each limit. A run that executes longer than runs.maxDuration is stopped and fails with that reason. The log of a run is cut off at runs.maxLogBytes with a truncated event; the state changes and the results of the tasks, with their last lines, are always kept.

Runs are written down when their state changes. On start the server takes them back:

  • finished runs keep their state, the results of their tasks, events and logs;
  • runs that wait for an approval wait on, for the time that was left, and are rejected when it has passed;
  • runs that were queued or running when the server stopped have failed with it: the server stopped while the run was running, submit it again.

A graceful stop (SIGTERM) leaves the waiting runs waiting, and cancels the queued and running ones.

A service run that is up gives its place back: it counts against runs.up instead, and it is not kept over a restart either, since its services stop with the server.

Changes to runs need a restart; only the entitlements are read again on SIGHUP, see Changing entitlements.

Config

server.yaml
runs:
  maxConcurrent: 4 # default
  keep: 200 # default
  activity: everyone # default, who sees the runs of others
  limits: # per caller (issuer and subject), 429 over it
    waiting: 10 # default, runs that wait for an approval
    queued: 20 # default, runs that wait for a free place
    running: 2 # default, runs that execute at once, the others wait in the queue
  maxDuration: 1h # default, a longer run is stopped and fails
  maxLogBytes: 1048576 # default, log output kept per run
  env:
    allow: [PATH, DOCKER_HOST] # the only variables of the server a run sees, none by default
    set: { CI: 'true' }
  network: { allow: [registry.npmjs.org] } # open by default
  secretNetwork: none # open by default, what a task that reads a secret reaches
  args: declared # any by default, which tasks take arguments
  up: { ttl: 8h, maxTtl: 72h } # the defaults, sleepTtl unset, see Service runs
  checksKeep: 30d # default, how long a check is found
KeyWhat it does
maxConcurrentRuns that execute at the same time, the others wait in queue. 4 by default.
keepFinished runs that are remembered, the oldest are dropped first. 200 by default.
activityWho sees the runs of others, see Who sees what: everyone (the default), a caller with a builds level sees who runs what in the repositories they have access to, where it waits and how long it took, never its arguments, why it failed or its log; involved only the runs they decide about or may open the endpoints of.
limitsWhat one caller may have at a time, see Limits and restarts.
maxDurationA run that executes longer is stopped and fails. 1h by default.
maxLogBytesThe log of a run that says more is cut off. 1 MiB by default.
env.allowThe variables of the server process that a run, its provider commands and the git fetch can see. Nothing else of the server's environment is passed on, and the list is empty by default. A server that runs tasks needs PATH in it, Windows needs its system variables (SystemRoot, ComSpec, PATHEXT, TEMP) as well.
env.setFixed values that are set in addition. Neither list may name a HAMMERKIT_RUN_ variable.
networkThe most any task or service of a run reaches besides the services it needs: open (the default), none or { allow: [hosts] }, as the network of a task. See Network.
secretNetworkThe most a task or service that reads a secret, or a variable of the server other than PATH, HOME and CI, reaches: open (the default), none or { allow: [hosts] }, within network. See Tasks that read secrets.
argsWhich tasks take arguments: any (the default) but those with args: false, or declared, only those with args: true.
upThe time and limits of service runs.
checksKeepHow long a check that a run passed is found by remote verify. 30d by default.

Network

runs.network is a ceiling for every run of the server, as hammerkit run --network is for a run on a laptop:

server.yaml
runtimes: [docker]
runs:
  network: { allow: [registry.npmjs.org, '*.githubusercontent.com'] }
  • A version whose tasks or services ask for more is refused when it is published (or proposed): with the ceiling above, a task without network (which is open), or one that allows pypi.org, can't be published. The error names the task and what it asks for. A wildcard of the server covers the names under it; a name does not cover a wildcard. A name of the server covers a TCP forward to any port of it (db.corp.internal:5432); a forward covers only itself, so db.corp.internal:5432 on the server lets a task forward to that port but not reach the name through the proxy.
  • So a build file published to such a server names its network on every task and service, which is also what a reviewer reads: the plan of a version shows each one's network.
  • Every run executes under the ceiling as well, and a version published before the ceiling was set, which asks for more, is refused when a run of it is submitted.
  • The services a task needs are reachable at every level.
  • Local tasks can't be limited on the server's machine, so a server with a ceiling below open allows only the docker runtime; runtimes: [docker, local] with it is a config error. On a Kubernetes backend a local task runs in a pod of a pool's tool image and is limited like a container task, so there it is allowed, and a local task may name its own network.
  • On a Kubernetes backend the ceiling is a NetworkPolicy on every pod, so it needs backend.networkPolicy: enforced; without that it is a config error. A task that reads a provider's secret there can be limited only when the server names the provider's endpoints, see Secrets in the Job.

Tasks that read secrets

A task that reads a secret runs its tools next to it: npm publish with a token, a deploy with a cloud credential. A tool that was changed, a dependency's install script or a compromised release, can send the value anywhere the task reaches. runs.secretNetwork holds every task and service that reads a secret, or takes a variable of the server into its envs (other than PATH, HOME and CI), to less than the others:

server.yaml
runs:
  secretNetwork: { allow: [registry.npmjs.org] }
.hammerkit.yaml
tasks:
  publish:
    image: node:24-alpine
    deps: [build]
    secrets:
      - { from: 'gsm:npm-token', account: release, env: NPM_TOKEN }
    network: { allow: [registry.npmjs.org] }
    cmds: [npm publish]
  • It is checked as runs.network is: a version in which such an item asks for more is refused when it is published, proposed and when a run of it is submitted, naming the item and what it reads. The other tasks keep what runs.network allows.
  • open, the default, holds nothing beyond runs.network, so existing build files keep working. none suits a server whose secret tasks only talk to the services they need.
  • It limits the task while it holds the value, not what it hands on: a task that writes the secret into its outputs, or a service it needs that has an open network, takes it further. Those are in the build file, which a reviewer reads.
  • An allow list is no wall around a shared host: a task that may reach *.googleapis.com reaches another project's buckets there too. Allow the names a task needs, not their domain.
  • Local tasks on the server's machine can't be limited, so with secretNetwork below open a local task that reads a secret is refused, except on a Kubernetes backend.

On this page