Skip to content
Latchkey home
Documentation menu

Run one-off jobs from the CLI

Run any command on a fresh Latchkey runner from your terminal or coding agent: the CLI packs your working tree, streams the logs back, and exits with the command's own exit code.

In short

  1. npm install -g @latchkeydev/cli, then latchkey run 'npm ci && npm test' runs the command on a fresh Latchkey runner and exits with the command's own exit code.
  2. Your working tree ships with the job: .gitignore rules apply, --exclude holds more back, credential-shaped files are held back by default, and .latchkeyignore overrides all three.
  3. Jobs bill as ordinary runner minutes from the same free-minute pool; their spend appears as its own CLI jobs line on the Cost page.
  4. Needs an API key that can run jobs. An owner or admin creates one in Settings, API keys and agents, and picks CLI runner under Access. Coding agents reach the same surface through the MCP run_job tool.

The Latchkey CLI (@latchkeydev/cli) turns a fresh CI machine into something you invoke like a local command. latchkey run 'npm ci && npm test' packs your working tree, runs the command on an isolated Latchkey runner, streams the output to your terminal, and exits with the command's own exit code. The upload leaves out what your .gitignore ignores, such as node_modules, so the command installs dependencies first. That makes it a verification loop you can script: run the check the way CI will run it, on a clean Linux machine, before you push. It is built for pre-push verification, for reproducing failures that only happen in CI (clean workspace, fresh installs, Linux), and for coding agents, which drive it like any other shell command.

acme-api · zsh · latchkey run

In a terminal in ~/acme-api, the command latchkey run 'npm test' prints: Packing context from /Users/me/acme-api..., Packed 412 file(s), 3.1 MB compressed., Created job cli-6f0e8a3c-6a3e-4a7e-9d5f-0f1c2b3a4d5e., the link to the job in the dashboard, Uploading context (3.1 MB)..., Context uploaded., Submitted; state: queued., then state: provisioning. The job's log streams back: the job agent's two [latchkey] lines, state: running, then the npm test output ending in 412 passed tests. It finishes with state: succeeded and Job cli-6f0e8a3c-6a3e-4a7e-9d5f-0f1c2b3a4d5e succeeded (exit 0).

FIG. 3.4-Alatchkey run 'npm test' packs the working tree, starts a job on a fresh runner and streams its log back. The CLI's own progress (dimmed here) goes to stderr, the job's output to stdout, and the command exits with the job's exit code.

Install and authenticate#

01
Install the CLI

Install globally with npm (Node 20.18.1 or newer), or run it ad hoc with npx @latchkeydev/cli. Install the scoped package name: the unscoped latchkey package on npm is an unrelated project.

terminal
1npm install -g @latchkeydev/cli
2latchkey --help
02
Create a jobs-enabled API key

An owner or admin creates one in Settings, API keys and agents, and picks CLI runner under Access. Capabilities are fixed at creation: an existing key never gains them retroactively. The full key (it starts with lk_live_) is shown once.

03
Log in

latchkey login validates the key without starting anything billable and saves it for this machine (~/.config/latchkey/config.json). In CI or an agent loop, skip the saved config and set the LATCHKEY_TOKEN environment variable instead.

Run a job#

terminal
1latchkey run 'npm ci && npm test'
2latchkey run --size large --timeout 3600 'npm ci && npm run build && npm test'
3latchkey run --env NODE_ENV=test 'npm ci && npm test'

Every run does the same five things: pack the current directory into a context archive, upload it, run the command on a fresh runner, stream the logs back live, and exit with the command's own exit code. A cancelled job exits 130, a job Latchkey expired before it ever started exits 124, and a command stopped at --timeout ends failed with timeout_exceeded and exits 1, so scripts and agents can branch on the outcome without parsing a line of log text.

latchkey run 'cd app && npm ci && npm test'

Pass a check of several steps as one quoted argument, changing directory inside it when it needs to. The runner runs that line in bash with -e and -o pipefail, so it stops at the first command that fails. A leading bash -c or sh -c typed as separate words would run only the first word of the script, so the CLI refuses it with exit 2, before anything is packed or sent, and prints the line to run instead: it keeps your shell inside the one argument, dropping it only when it was bash with -e and -o pipefail. A bash -c inside the one quoted argument, or latchkey run bash ci.sh, runs as written.

acme-api · zsh · latchkey run

latchkey run 'npm run e2e' streams the job's log until the reader presses Ctrl-C. The CLI then prints job still running: latchkey cancel cli-8c41a0f2-7d3e-4b9a-a5c6-1e2f3d4b5c6a | latchkey logs cli-8c41a0f2-7d3e-4b9a-a5c6-1e2f3d4b5c6a --follow, the shell reports exit code 130, and the job keeps running on its runner. latchkey cancel with the job id then prints Cancellation requested; the runner honors it within about 10 seconds (current state: running).

FIG. 3.4-CCtrl-C stops the tail, not the job: the CLI prints how to cancel it or follow it again, and latchkey cancel stops it on the runner within about 10 seconds.
acme-api · zsh · latchkey run --timeout

In a terminal in ~/acme-api, latchkey run --timeout 120 'npm run e2e' prints Packing context from /Users/me/acme-api..., Packed 412 file(s), 3.1 MB compressed., Created job cli-5d9e2c71-4b8a-4f06-9e3d-a1c7b2f4e860., the link to the job in the dashboard, Uploading context (3.1 MB)..., Context uploaded. and Submitted; state: queued. The job's log streams back: the job agent's [latchkey] line, state: running, the e2e script starting Playwright with Running 86 tests using 4 workers, then a row of dots, one for each passed test. Two minutes after the command started, the log prints [latchkey] job timed out after 120s. The CLI then prints state: failed and Job cli-5d9e2c71-4b8a-4f06-9e3d-a1c7b2f4e860 failed. The job reported: timeout_exceeded, and exits with code 1.

FIG. 3.4-DA command that outruns --timeout is stopped on the runner and the job ends failed with the reason it reported, timeout_exceeded, so the run exits 1. Exit 124 is only for a job Latchkey expired before it ever started.

Split a suite across runners#

A long suite finishes sooner as one job per shard. Set a new batch's budget, start one detached job per shard with the test runner's own split flag passed through the package's own test script, then follow each job for its verdict. Going through the script runs the package's pretest steps (a typecheck of the tests, say) in every shard, as CI runs them, where calling the test runner directly skips them. The block stops starting shards once one is refused and ends non-zero when a shard did not start or failed:

split-suite.sh
batch="suite-$(date +%Y%m%d%H%M%S)"
failed=0
ids=()
latchkey budget set "$batch" 4 || failed=1
for shard in 1 2 3 4; do
  [ "$failed" -eq 0 ] || break
  id=$(latchkey run --batch "$batch" --size large --detach "npm ci && npm test -- --shard=$shard/4") || true
  if [ -n "$id" ]; then ids+=("$id"); else echo "shard $shard not started"; failed=1; fi
done
for id in "${ids[@]}"; do
  code=0
  latchkey logs "$id" --follow > "$id.log" || code=$?
  echo "$id exited $code"
  [ "$code" -eq 0 ] || failed=1
done
[ "$failed" -eq 0 ]

Every shard pays its own install and is billed in its own whole minutes, and every shard counts against the workspace's concurrency limit, which every agent and workflow run in the workspace shares. Split only a suite long enough to win back the extra installs, and keep a burst well under the limit. A workflow file shards the same way with a matrix.

The commands#

CommandWhat it does
latchkey loginValidate an API key and save it for this machine
latchkey runPack the current directory, run a command on a fresh runner, stream the logs, exit with the command's code
latchkey listList recent jobs, newest first, including the ones still running
latchkey logsPrint a job's logs, or tail them to completion with --follow
latchkey statusShow a job's state, runner size, timing, and exit code
latchkey cancelRequest cancellation; a running job stops within about 10 seconds
latchkey budgetSet a batch's first budget in US dollars and first limit on jobs running at once, lower them, or show them with its spend; an API key never raises either
latchkey batchShow one batch's budget, spend, jobs by state and jobs
latchkey waitWait for jobs or a batch to end, then summarize each outcome
latchkey watchPoll for CI failures self-healing recorded but did not fix and hand the first new one of each job (of each run on Latchkey on GH) to your coding agent
latchkey cacheRestore or save a cache entry from inside a job, so a dependency directory survives to the next one
latchkey artifactUpload or download an artifact inside a job of a Latchkey CI run, passing files between the jobs of that run
latchkey oidcGet a short-lived identity token inside a job of a Latchkey CI run, so the job can sign in to your cloud with no stored key
latchkey secretsSet a secret the steps of a workflow file read, for the whole workspace or one repository
latchkey migratePlan a repository's move from GitHub Actions to Latchkey CI and open the pull request for it (opening it needs a key created with Allow opening migration pull requests)
latchkey stepsList the Latchkey steps a workflow file can name, each at its newest version with its inputs and their rules
latchkey validateCheck a changed workflow file without starting a run: its first refusal, or its jobs and the most one run of them can cost
latchkey preflightRun one workflow file, as Latchkey compiles it, on your working tree before you commit or push it (needs a repository connected to Latchkey CI)
latchkey workflowsStart a manual run of a workflow file that accepts manual runs, on a branch or tag with its inputs (needs a key created with Allow starting Latchkey CI workflows)

The run flags you will actually use: --size picks the runner (small is the default; medium, large, and xlarge match the runner sizes your workflows use), --env KEY=VALUE passes secrets and settings without shipping them as files, --timeout accepts 30 seconds to 3 hours (jobs default to 30 minutes), --detach submits the job and exits so you can tail it later, and --no-context runs the command in an empty workspace with nothing uploaded. --batch <name> puts the job in a named batch of 1 to 64 characters with no / or %, not . or .. alone (or set LATCHKEY_BATCH once for every job of a shell), so one piece of work's jobs and spend read together. Every remote command takes --output json for machine-readable output, and the package ships its own deep reference (SKILL.md) that a coding agent can read for the full contract.

What each release added, changed and fixed is in the Latchkey CLI changelog.

acme-api · zsh · latchkey run --detach

latchkey run --detach 'npm ci && npm test' packs and uploads the working tree with the same progress lines as a plain run, prints the job id cli-2b9d4e71-0c5a-4f3e-8a6d-7e1f9c3b5a20 and returns at once. latchkey status with that id prints the job's rows: State running, Runner size small, Rate $0.0025 a minute, Cost so far $0.0025 at list rate, before free minutes, Timeout 1800s, Cancel requested no, Exit code and Failure reason not set yet, and the Created, Submitted and Started times. latchkey logs with that id and --follow prints the job's log from the start through the test results, then state: succeeded and Job cli-2b9d4e71-0c5a-4f3e-8a6d-7e1f9c3b5a20 succeeded (exit 0).

FIG. 3.4-E--detach hands back the job id at once instead of streaming. latchkey status reads the job, and latchkey logs --follow picks up its log from the start and exits with the job's exit code.
acme-api · zsh · latchkey list

In ~/acme-api, latchkey list --limit 5 prints the workspace's five newest jobs as a table with the columns JOB, STATUS, SIZE, BATCH, KEY, DURATION, COST, COMMAND and QUEUED. The newest, cli-4e7a9c21-8b3d-4f6e-a1c5-9d2b7e0f3a64, is running on medium in the batch refactor-auth, started with the key claude-code, its command shown as npm run, its duration as a hyphen and its cost so far as half a cent. The next two ran npm test on small in the same batch: success in 1m52s for half a cent, and failure (1) in 2m07s for three quarters of a cent. The last two ran with the key laptop and no batch: npm run on large, success in 6m31s for 7 cents, and npm ci on small, success in 48s for a quarter of a cent. Each row ends with the time its job was queued, from 2026-10-15T10:42:18.604Z back to 2026-10-15T09:47:12.773Z.

FIG. 3.4-FA job id that scrolled out of the terminal is one latchkey list away. Running jobs are listed too, with no duration until they end; a failed job carries its exit code beside its status, and the command column shows only the program and its first subcommand, so a token on the command line never prints.
acme-api · zsh · latchkey run --quiet

In ~/acme-api, cat ci/deps.sh prints a five-line script: set -e, npm install -g @latchkeydev/cli, latchkey cache restore --key npm-cache --version v1, npm ci --cache .npm-cache and latchkey cache save --key npm-cache --version v1 .npm-cache. latchkey run --quiet 'bash ci/deps.sh' prints the new job's id, cli-0d4f7b2e-6c1a-4e95-a8b3-f2e7c9d1a046, and its link in the dashboard, then the job's log: the job agent's [latchkey] line, added 9 packages in 2s, cache miss: npm-cache (version v1), added 1291 packages in 41s and cache saved: npm-cache (61834215 bytes). The same command again starts cli-8f3a6e19-b2d7-4c40-9e5f-1a7c0b4d2e83, whose log reads added 9 packages in 2s, cache restored: npm-cache (61834215 bytes), added 1291 packages in 9s and cache entry already exists: npm-cache was not overwritten. Both runs exit with code 0.

FIG. 3.4-Glatchkey cache runs inside a job, so the job installs the CLI first. The first run misses and saves the npm cache; the next restores it before npm ci, and its save leaves the entry as it is, because a key that holds an entry is never overwritten. A miss exits 0, as an error from the cache proxy does, so a cold or unavailable cache never fails a job, and --quiet keeps the CLI's own lines to the job id and its link.

latchkey artifact also runs inside a job, but only in a job of a workflow file run: upload --name <name> <path...> packs the paths into one artifact, and download --name <name> fetches one that a job this job needs uploaded. An upload leaves out files and directories whose names start with a dot, such as .git and .env, unless it is given --include-hidden-files, and an upload that names one of them without that flag fails, as does an upload that finds no regular file under its paths. Unlike latchkey cache, a failed upload or download exits 1, so the step fails. A job of a preflight cannot upload or download artifacts: the store refuses every call it makes, and the command exits 199, which the preflight reads on the first failed step of the job to report it not run rather than failed. The Workflow files page has the rules: names, limits and how long an artifact is kept.

acme-api · zsh · latchkey secrets set

In ~/acme-api, latchkey secrets set NPM_TOKEN prompts Secret value (input hidden): and shows nothing while the value is typed, then prints Set NPM_TOKEN for the workspace (version 1). Next, echo "$DATABASE_URL" is piped into latchkey secrets set DATABASE_URL --repository acme/api, which reads the value from the pipe and prints Set DATABASE_URL for acme/api (version 2). Both commands exit with code 0.

FIG. 3.4-Hlatchkey secrets set stores a secret that the steps of a workflow file read as ${{ secrets.NAME }}, for the whole workspace or, with --repository, for one repository. The value comes from a hidden prompt or a pipe, never from the command line, and is never printed; setting a name again stores a new version. It needs a key created with Allow setting workspace secrets; a CLI job takes its secrets through --env instead.

What ships with the job#

latchkey run packages the directory you run it from, never the enclosing repository, so running from a subdirectory ships just that subdirectory, and --context <dir> points it somewhere else. The command runs at the root of the uploaded tree, so the directory --context names becomes the workspace root on the runner. --context and --exclude are read only before the command, so the command's own flags pass through. Four rules decide what goes in, and the last one to express an opinion wins:

  • Every .gitignore inside the packaged tree applies to untracked files, so ignored dependency installs and build output stay home and the job installs from scratch, the way CI does. Only ignore files inside the tree count: run from a subdirectory and the repository root .gitignore no longer applies (a .latchkeyignore at the packaging root is the fix).
  • --exclude <pattern> holds more back straight from the command line, in gitignore syntax, one pattern per flag. It takes no negation: a leading ! is a usage error, because --exclude can only ever hold more back, never re-admit something.
  • Files shaped like credentials (.env files, private keys, cloud credential files) are held back by a built-in deny-list, and every exclusion is printed. No --exclude pattern can ship a file the credential deny list blocks, and every file the deny list blocks is reported. A .gitignore can never re-include them either.
  • A .latchkeyignore file (same syntax) outranks all three: use it to exclude more, or to deliberately re-include something the deny-list held, which prints a loud warning naming the file. It is the only rule source that can do that, because it is the repository owner's own file.
  • A job that needs two packages of one repository packs the directory holding both and changes directory inside its one command (cd shared && npm ci && cd ../web && npm ci && npm test). Packing one package's directory leaves its siblings at home.
  • Every command starts with its install, since a job runs on a clean runner. Where no ignore rule names node_modules, it ships and costs upload time for nothing: hold it back with a node_modules line in .latchkeyignore, without a trailing slash.
  • A file committed with git add -f that a .gitignore pattern matches ships, because the pack packs what git tracks. A committed config file a test reads that matches a credential pattern still stays home (*.config.tfvars matches *.tfvars): if it holds no secret, bring it back with a ! line in .latchkeyignore.
.latchkeyignore
!test/fixtures/**/*.txt
!terraform/*.config.tfvars
What latchkey run packs~/acme-api
.gitignore
.latchkeyignore
Untick a line to comment it out.
Credential deny-list: 39 patterns
.env.env.**.env.envrc.dev.vars*.pem*.key*.p12*.pfx*.p8*.ppk*.jks*.keystoreid_rsaid_rsa.*id_dsaid_ecdsaid_ed25519id_ed25519.*.ssh/.aws/.gnupg/.kube/kubeconfig.npmrc.netrc.pypirc.pgpass.git-credentials.vault-token.terraformrc.htpasswd**/.docker/config.json*.tfstate*.tfstate.**.tfvarsservice-account*.jsonserviceAccount*.jsongcp-credentials*.json
Never denied (left to your own rules):
.env.example.env.sample.env.template.env.*.example*.example.env*.sample.env*.example.tfvars*.sample.tfvars*.tfvars.example*.tfvars.sample
  • .env112 Bleft out
  • .env.example98 Bpacked
  • .git/left out
  • .gitignore37 Bpacked
  • .latchkeyignore34 Bpacked
  • .npmrc52 Bleft out
  • README.md1.8 KBpacked
  • data/left out
  • seed.sql1.4 GBleft out
  • dist/left out
  • server.js612 KBleft out
  • node_modules/left out
  • 18,240 files in 2,315 folders212 MB
  • npm-debug.log9.6 KBleft out
  • package-lock.json186 KBpacked
  • package.json1.2 KBpacked
  • src/packed
  • routes.ts4.1 KBpacked
  • server.ts2.3 KBpacked
  • test/packed
  • api.test.ts5.4 KBpacked
  • fixtures/packed
  • tls.key1.7 KBleft out
.npmrc
Held back by the built-in deny-list pattern .npmrc, whatever .gitignore says. latchkey run names it, and only a ! line in .latchkeyignore can bring it back.
Files
9
Uncompressed
201 KB
of 1 GiB
Entries
12
of 250,000
What latchkey run prints
Excluded 3 path(s) matching the credential deny-list. Add a "!" line to .latchkeyignore to include one deliberately:
.env
.npmrc
test/fixtures/tls.key
An example project; its sizes are illustrative. The compressed archive may be at most 200 MiB, and folders may nest at most 64 levels deep. A context past any limit fails before anything uploads.

Limits#

LimitValue
Command line16,384 characters
Environment variables64 per job
Job timeout30 seconds to 3 hours, default 30 minutes
Job budgetNone by default; with --budget or budget_usd, the job is stopped once it has cost that much at its size's list rate, counted in whole minutes
Batch budgetNone by default; set or lowered with latchkey budget set or the set_batch_budget tool, never raised by an API key. Once a batch's jobs have cost its budget at list rates, a new job in it is refused and its queued jobs are held; running jobs finish, so a batch can end a little past its budget
Spend limitThe workspace's limit for the calendar month, set by an owner or admin. At it, latchkey run is refused (exit 1) and a running job is stopped (exit 130); a job or batch budget can never be set above it.
Context upload200 MiB compressed, 1 GiB uncompressed, 250,000 entries
Context kept per workspace20 GiB of uploaded context in total at any one time by default; an upload is released when its archive is deleted and its upload URL has expired, or when it expires
Job creationDeveloper 120, Launch 240, Scale 600 per workspace per clock hour; Enterprise by contract. A workspace can carry its own number, and a refusal names the live one. A refused create counts toward the hour.
Reads per API key900 per clock minute, across the Jobs API reads and the MCP read tools; a refused read counts. Past it a read is refused until the minute turns, with the seconds to wait (retry_after_s, and a Retry-After header on the Jobs API's 429). A wait on runs (latchkey wait --commit or --pr, or the MCP tool wait_run) is not counted.
Job recordsStatus stays readable after a job finishes, logs for 30 days and cancel for about 24 hours; latchkey list still shows older jobs

A context past its ceiling fails the pack locally, before anything is uploaded or billed, with the largest paths named so the fix is usually one .latchkeyignore line.

A job is not refused at your workspace's limit of jobs running at once: Latchkey holds it in the queue, and it starts when a running job finishes. While jobs you started are held at or near the workspace's limit, start nothing new and combine checks into fewer jobs.

acme-api · zsh · latchkey budget set

In ~/acme-api, latchkey budget set refactor-auth 10 prints Set the budget of batch refactor-auth to $10.00. Spent so far: $2.415 at list rates. latchkey budget set refactor-auth 5 lowers it and prints Set the budget of batch refactor-auth to $5.00. Spent so far: $2.415 at list rates. latchkey budget set refactor-auth 20 asks for a raise, and the CLI prints the refusal Batch refactor-auth already has a budget of $5.00, and an API key can only lower a batch's budget, so Latchkey left it unchanged. Start the work under a new batch name, or ask a workspace owner to raise this one. That command exits with code 1.

FIG. 3.4-IAn API key sets a batch's first budget and can lower it, but never raise it; a workspace owner or admin can, on the Billing page. Spent so far is what the batch's jobs have cost at list rates, and once it reaches the budget, a new job in the batch is refused and its queued jobs are held.

Billing#

CLI jobs are ordinary runner minutes: the same per-minute rate as a workflow job on the same size, rounded up per job, drawn first from the same monthly free-minute pool. The meter runs from when your command starts to when the job ends; queue and provisioning time is never billed. On the Cost page this spend appears as its own CLI jobs line, because these jobs belong to no repository or workflow. Once a job ends, latchkey status and latchkey list show what it cost at list rate, before free minutes.

Self-healing works here too#

Every CLI job runs under the same self-healing machinery as your workflow jobs. Environment failures (a flaky registry, a missing system package, a full disk) are diagnosed in place while the job runs and fixed when a heal applies: a healed retry that passes exits 0, and when nothing applies the command's original exit code stands. Real defects in your code pass through unchanged so the exit code tells the truth. One difference from workflow jobs: a CLI job has no repository, so healing never opens a pull request; fixes happen on the runner or not at all. To diagnose a failure, self-heal can read files of the working tree you uploaded: at most four lookups a diagnosis and the first 8 KiB of a file. What it reads goes to our AI model provider and is kept in the heal record for 90 days, after the upload itself is deleted. A file you hold back with --exclude never reaches the runner. The diagnosis runs inside the billed window, so a red run bills noticeably more than a green one (typically about an extra minute); budget for it when iterating on a failure.

The other direction: watch#

latchkey run is you asking Latchkey to check something. latchkey watch is Latchkey telling you something broke: it polls the failures self-healing recorded but did not fix (your workflow runs, and CLI jobs too) and hands the first new one of each job (of each run on Latchkey on GH) to your coding agent (Claude Code by default, --agent for anything else). The agent reads the failure's record through the MCP server, so connect it there first. Use --once for a one-shot listing and --no-spawn to print without starting anything. Any key can run watch; it only reads.

acme-api · zsh · latchkey watch

In ~/acme-api, latchkey watch prints Watching for new failures every 15s (2 existing failures ignored). New ones go to: claude. When a new unhealed failure lands, it prints failure 7c2e9a14-3b5d-4f81-9a6e-0d4c8b2f1e37, then the repository acme/api, workflow ci, category test_failure, failing file src/auth/refresh.ts and the root cause token expiry compared in seconds against a millisecond clock on one line, then the run's GitHub link, and finally Handing 7c2e9a14-3b5d-4f81-9a6e-0d4c8b2f1e37 to claude…

FIG. 3.4-JAlready-known failures are ignored; each new one prints with what self-heal recorded, and the first new one of each job (of each run on Latchkey on GH) is handed to your agent once. The output is the CLI's own, separators included.

Works with#

  • Connect your AI agent: the MCP run_job tool is the same job surface without a terminal. It starts from an empty workspace; the CLI is the way to ship your working tree.
  • Runners overview: CLI jobs run on the same four runner sizes and the same runner image, fresh for every job and destroyed at the end.
  • Runner usage and free minutes: how the per-minute metering and the free tier work.
  • Cost: where CLI job spend appears in the dashboard.

Common questions#

Q.01Does the job see my git history?

No. The .git directory is always excluded and cannot be re-included. The job sees your files as they are on disk, in a one-commit repository the runner builds when it can, so git commands work; its HEAD is not your commit, so if the command needs a commit SHA or branch name, pass it through --env.

Q.02Can a job reach my local services or databases?

No. The runner is a fresh, isolated machine with no route back to your laptop. It sees the uploaded tree and the environment variables you pass, nothing else. Interactive commands hang for the same reason: there is no terminal on the other end, so anything that prompts waits until the timeout ends the job.

Q.03What happens when I press Ctrl-C?

It stops the tail, not the job: the job keeps running (and billing) on the runner. The interrupt notice prints the two follow-ups, latchkey cancel <id> to stop the job and latchkey logs <id> --follow to re-attach.