Security

Coding agents can make mistakes, and they can be misled by what they read: a README, an issue, a web page. So Threadrun treats every agent as untrusted code and limits what it can touch. This page explains those limits in plain words, and what they don't cover.

Each thread in its own container

Each thread runs in its own Docker container, separate from your normal checkout. It gets only its own agent's login, your GitHub login only when it works on a GitHub project, and network access only to its model provider, GitHub and package registries, plus sites you allow. Containers share the runner's kernel; they are not virtual machines.

Inside its container an agent:

  • works on its own copy of your repository, cloned from GitHub. Your folders aren't mounted;
  • runs as an ordinary user, with no special Linux permissions and no access to Docker;
  • has limits on memory (up to 2 GB, its share of the server's memory), processors and the number of programs it runs;
  • can't reach other threads' containers, and nothing on the internet can connect to it.

Because containers aren't virtual machines, a flaw in Docker or the Linux kernel could let an agent escape. Keep your computer or server up to date, and don't run Threadrun on a machine that holds secrets you couldn't afford to lose.

What each thread gets

  • Only its own agent's login. A Codex thread gets your Codex login, an OpenCode thread your OpenCode logins, and so on. API keys go only to agents that can use them.
  • Your GitHub login only for GitHub projects. Threads on other projects get none. Your agent can do whatever your GitHub token allows, so use a fine-grained token limited to the repositories you choose.
  • No SSH keys. Your SSH keys stay on your computer; the app uses them only to reach your server.
  • Only the toolchains your runner carries. A sandbox has Node.js, Python and a C/C++ compiler. A runner can also carry Rust, Go, Java and .NET in one read-only cache shared by its threads. An agent enables one with the install_toolchain tool, which the runner records on the thread; the cache is read-only, so one thread can't change what another uses.

An agent can read the logins of its own thread: it needs them to work.

Network

Containers have no direct internet access. Every connection goes through Threadrun's proxy and is logged on the thread. By default, a thread can reach only:

  • its own model provider, for example OpenAI for Codex;
  • GitHub, when it works on a GitHub project;
  • package registries such as npm, PyPI and crates.io;
  • sites an admin added in Governance.

An allowed site can still be used to send data out, so keep the list short. An admin can turn the allowlist off; connections are then open, but still logged.

Tool approvals

You choose which actions need your approval: edits, commands, web fetches, deleting files. These rules work only when the agent asks for permission before acting, and agents differ:

  • OpenCode asks before every edit, command and web fetch.
  • Codex asks only before actions outside its workspace.
  • Gemini CLI asks before edits and commands in its default mode.
  • Oh My Pi asks before some commands and file deletions, depending on its approval mode.
  • Mistral Vibe asks before edits, commands and other risky actions in Ask, the mode Threadrun starts it in. In Accept Edits it applies edits without asking.
  • Pi doesn't ask. Only the container and network limits apply.

In modes that never ask, only the container and network limits apply. The composer warns you when you pick one. See Governance.

Budgets

Budgets stop a thread, factory run or loop from starting new turns once it reaches its limit. They count the usage the agent reports, usually when a turn ends, so a long turn can go past the limit. When an agent or plan doesn't report cost, cost budgets can't count it; token budgets still do.

What is stored, and where

WhatWhereProtection
Your logins and API keysYour computerThe macOS Keychain or Windows Credential Manager
A thread's logins, your current GitHub login, team members' logins, loop secrets, long-term memoryThe runnerEncrypted with the runner's own storage key
Threads, files and historyThe runnerHistory is hash-chained: Verify audit detects an edited or removed event
Idle workspaces (archived after an hour)The runnerEncrypted, and login files are left out
Team PINsYour serverOnly a keyed hash, never the PIN

The storage key lives next to the runner's data by default, so it protects a copied database or backup, not someone who can read the whole server. Admins can keep it in a secret store instead. Logs are redacted: API keys and tokens in known formats are removed before they're stored.

Threadrun has no account and no cloud service of its own, and the app sends no telemetry. This website (threadrun.dev) uses Google Analytics only if you accept it. The app contacts threadrun.dev only for updates and model information. What your agent reads and runs goes to the model provider you chose, under its terms. See Privacy and data.

Team sign-in

People you invite sign in with their name and an 8-digit PIN.

  • Company accounts (OIDC). With an identity provider configured, the runner checks the provider's signed ID token itself: signature against the provider's published keys, plus issuer, audience, expiry and nonce. The sign-in state is single-use, expires after 10 minutes and is bound to the browser by a cookie, so a crafted link cannot sign someone in as another person. Only emails the provider marks verified, on an allowed domain, are accepted. The provider's client secret is stored encrypted on the runner with its storage key and is never sent back to the app. Details.
  • They type the PIN only on your server's own page, at your environment's address followed by /app/. The sign-in page on threadrun.dev never asks for a PIN: it only sends people to that address.
  • A link can't quietly change a remembered address. If an invite link points a known environment to a new address, the page shows both and asks before using the new one. If you didn't expect a move, close the page.
  • Wrong PINs lock the sign-in. Five wrong PINs in a row lock that person until an admin gives a new PIN. Too many failures from one address make it wait 15 minutes.
  • Your server accepts sign-ins only from its own page, or from the Threadrun app. Other websites can't sign anyone in or use an open session: the app's sign-in needs a header that browsers never send from another site.
  • The app shows where the PIN goes. Members who join from the desktop app see the address next to the PIN field. The app remembers each environment's address and asks before using a new one. It keeps the sign-in, never the PIN.
  • Each member uses their own logins. Members connect their own GitHub and API keys. By default they can't use yours. An admin can let them use your API keys, billed to you. Subscription sign-ins are never shared.

Phone links work the same way: the link alone isn't enough, it also needs a 6-digit PIN that only your app shows, and five wrong PINs lock it.

Share links are different on purpose: anyone with one can open a file and its folder, without a PIN, for 7 days. They never include hidden files such as .env, and you can turn them off for a thread at any time.

Letting another agent start work

A runner's MCP key is derived from the runner's token and is not stored separately. It acts as an Operator: it can start threads, factories and loops, send prompts, cancel work and read their logs. It can't change the policy, team, logins or settings, approve a gate or answer a permission request. The endpoint is on the runner's own API address, and on its public phone address when phone access is on. Treat the key like an API key; changing the runner's admin token (THREADRUN_TOKEN) changes every derived key. See Start from another agent.

Supported agents and sign-ins

Threadrun runs the agents as their makers publish them: OpenCode, Claude Code, Codex, Gemini CLI, Pi, Oh My Pi and Mistral Vibe. It offers only the sign-ins their providers allow third-party tools to use:

AgentSign in with
OpenCodeYour API keys, your GitHub Copilot or ChatGPT sign-in, OpenCode Zen, or free models
Claude CodeYour own Claude Code login or claude setup-token token, or an Anthropic API key
CodexYour ChatGPT sign-in or an OpenAI API key
Gemini CLIA Gemini API key
Pi and Oh My PiAPI keys (Anthropic, OpenAI, Google Gemini, OpenRouter and others)
Mistral VibeA Mistral API key of the Vibe type

What isn't supported, and why:

  • Claude Code runs the published Claude Code binary unmodified, through Anthropic's ACP adapter, under the user's own login or API key. Anthropic's terms allow a platform to host the unmodified binary when each user signs in with their own credentials. Threadrun doesn't offer a Claude.ai sign-in of its own, doesn't use a Claude subscription token in another harness, and doesn't resell or intermediate usage. Anthropic may bill third-party use to usage credits rather than subscription limits; teams should use an Anthropic API key.
  • Claude subscription sign-ins are not passed to OpenCode, Pi, Oh My Pi or any other harness.
  • Google account sign-in for Gemini CLI isn't offered: Google's terms don't allow other software to use it. Use a Gemini API key.
  • Mistral Vibe's browser sign-in isn't offered: the sandbox has no browser, and a shared runner shouldn't hold a person's Mistral AI Studio session. A Vibe-type API key uses your organization's Mistral plan instead.

Subscription sign-ins (ChatGPT, GitHub Copilot) are personal: each person signs in with their own account.

Downloads and updates

Each release publishes SHA-256 checksums, and the app checks every update against them before installing it. This shows that the file arrived complete and unchanged. It is not a signature: the checksums come from the same website as the files. See Install to check a file yourself.