Skip to main content
loomcycle
§ story · v1.162.0 → v1.172.0

We removed Bash.

Over one week, ten releases moved every command an agent runs out of the runtime and into a workspace of its own

1. The tool everyone expects

Every agent framework ships a shell tool. loomcycle had one too: the Bash tool, plus a smaller cousin called Bashbox, an interpreter that ran inside the runtime with a fallback that could call real programs on the host. For bigger jobs there was a builder sidecar, a separate container with its own sandbox tools.

On November 27 we deleted all of it. Version 1.172.0 has no Bash tool, no Bashbox, no in-process shell interpreter, no shell_credentials field, no sandbox sidecar and no toolbox image. An agent that needs to run a command now runs it in a workspace.

This post is the story of why we did that, what we built in its place over the ten releases from v1.162 to v1.172, and what you need to change if you used Bash.

2. What was wrong with a shell inside the runtime

loomcycle is an agentic kernel: it schedules agent runs, holds their state, keeps their credentials and decides what each one may touch. A kernel should be the most careful process on the machine. A shell tool asks it to do the opposite and hand a language model a general-purpose program with the kernel's own rights.

Our docs already said it plainly in the migration guide we wrote for this change:

We had been patching around these facts for a while. In October we ran a security review of the whole runtime, and two of its findings were about the shell.

The first was about stopping things. Only the direct child of a command was killed on a timeout. A background process holding the output pipe blocked the call for its whole life, so sleep 600 & echo hi took 600 seconds whatever the timeout said. We fixed it by putting each command in its own process group and killing the group. The release notes of that fix end with a sentence that stayed with us: a descendant that calls setsid() leaves the group and survives. "Bash is still not a sandbox."

The second was about secrets. The docs had claimed that a credential passed to a Bashbox host command was out of the model's reach. It was not. With git allowed, git -c alias.x='!env' x prints the environment, token included. We added per-command credential binding and stricter boot checks, and we corrected the docs. But the shape of the problem did not change: if a secret is in a shell's environment, a model that can type into that shell can read it.

Then there was state. A shell session lived inside a run. When the run ended, whatever it had installed or built was gone. The next run started from nothing.

So we had a tool that shared the host with the kernel, carried secrets the model could print, and forgot everything between runs. Each fix made one of those a little smaller. None of them made it go away.

3. The idea: commands run somewhere else

A workspace is a directory on a workspace worker, a process apart from the runtime, where an agent runs shell commands and works on files through the Workspace tool. The worker holds no credential. The runtime decides what the worker may do and stays the only place secrets live.

Here is the example from the guide, unchanged. An agent opens a workspace, writes a script, runs it and reads what it wrote:

{"op": "open", "name": "py", "toolchain": "python"}
{"op": "write", "name": "py", "path": "square.py",
 "content": "import sys\nn = int(sys.argv[1])\nopen('out.txt', 'w').write(str(n * n))\nprint('squared', n)\n"}
{"op": "exec", "name": "py", "command": "python3 square.py 12"}
{"op": "read", "name": "py", "path": "out.txt"}

The exec call answers {"exit_code": 0, "output": "squared 12\n"} and the read returns 144. By default, when the run ends the workspace is deleted, files and all. Paths with .., absolute paths elsewhere and symlinks out of the workspace are refused, on the worker.

That looks a lot like Bash, on purpose. What is different is where it runs and what it can see.

4. Building it, one release at a time

We did not flip a switch. The work landed in steps, and each step was usable before the next began.

v1.162: groundwork. A workspaces table in the store, the agent's workspace field, a worker protocol and a new token scope, workers:attach, that does nothing except let a worker attach. Nothing usable yet.

v1.163: one machine. workspace.mode: local has the runtime start one worker as its own child, on a Unix socket in a private directory, with a random token made for that boot. loomcycle doctor gained checks for it. We were clear in the guide about what this mode is: it runs every command as the runtime's own user, with no isolation. It is for a single trusted machine, and the boot log says so.

v1.164: files. Workers stream files in and out and keep a disk quota. The quota stops what File and the Workspace tool write before a byte is written. A command's own writes are measured after it ends.

v1.165: work on files where they are. Files in a workspace can be copied, imported, converted, OCR'd, transcribed and unpacked on their own worker. A file's bytes never pass through the model; the agent works with references.

v1.166: the big one. In a single release workspaces got:

v1.169: a place an agent keeps working in. Workspaces can now be durable: kept after the run ends and opened again by the same user's next run. They travel in a snapshot (the row, not the files), survive a worker's restart, and work across several replicas. They can start from a template and fork for each sub-agent at spawn, so two children trying plan A and plan B never touch each other's copy. They can serve a page to the user in the chat and take the person's updates back with await, and with screenshot the agent sees the page it built. Bash, Bashbox, the sidecar's tools and shell_credentials became deprecated here, with boot warnings, a doctor check and a metric showing where each was still in use.

v1.170: git, finished. More on this below.

v1.171 published loomcycle-ws-worker, a worker image with the docker client in it.

v1.172: removal.

5. Where the credential went

This is the part that answers the October finding.

A workspace has no network of its own. What it may reach is a list of routes. A route is a name, an https upstream URL, the methods it allows, and optionally a stored credential. A script in the session asks the worker for <base><route>/<path>. The worker passes the request to the core over its own connection. The core decides whether to send it, builds the upstream request itself, adds the credential and streams the answer back. The worker and the session never see a route's URL list or a credential.

From a script, it looks like this:

curl "${LOOMCYCLE_EGRESS}crm/deals?since=2026"

There is no token in that command, and none in the environment. Routes are written by the operator, or by a tenant operator when allowed. Never by an agent, so a model cannot widen its own way out.

A credential never enters the workspace. The core adds it to the requests that leave.

On the container engine, a session with no routes has no network at all: a connection or a name lookup fails at once. On the host engine of local mode, egress is a convenience, not a boundary, and the docs say that too.

6. Git without a token in any command

Git was the hardest case for the old shell, because a push needs a credential and git is very good at printing its configuration.

A git workspace is a repository checked out on its own branch. The agent opens one with repo and an optional credential, which is a $cred: reference restricted to URLs covering that repository. It is resolved in the run, and its value never reaches the worker. The worker keeps one bare mirror per tenant and repository, and every git request it makes goes to the runtime with a ticket tied to the op that asked for it. The runtime adds the credential and sends it on.

In v1.170 the typed ops were completed:

The runtime reads every push's ref updates before anything reaches the forge, and refuses any update but the workspace's own branch. It is never the forge's default branch.

The team/repo agent in the agent-teams bundle now clones into a git workspace, commits and pushes the team's branch and opens the pull request, with the credential held by the core and no token in any command.

7. A worker on your own laptop

Some work belongs on the user's own machine: their project folder, their notes. A personal worker runs there and offers folders by name:

loomcycle worker --role workspace --personal \
  --root code=~/code/myproject --root notes=~/notes

A workspace opened on a root is that folder, not a copy, and the worker never deletes anything in it. A root's path never leaves the machine. It only works with a runtime on that same machine, and the user's token serves that user's runs and no one else's. The trade is stated in the guide: the host engine is not a sandbox, so give roots only to agents you would let work in your own files.

8. What happens when you upgrade

We wanted the removal to be loud for operators and quiet for running systems.

Your config refuses to start if it still names a removed item. A yaml or markdown agent whose tools names Bash or Bashbox, any shell_credentials key, any of the retired variables set to a non-empty value, or LOOMCYCLE_PRESETS naming sandbox or dev-exec: each stops the start. One error lists every use, each with the line to change and a link to its section in the migration guide. loomcycle doctor shows the same lines under its "Removed" check.

Stored definitions keep running. An agent definition already in the store that names Bash runs without it. Each run carries a capability_inert event, gate removed, so you can see which ones still need attention. Fork the definition without the item to clear the notice.

The replacements ship with the release. The dev-workspace bundle replaces sandbox plus dev-exec: its dev/exec takes the same command envelope and returns the same result shape, running it in a workspace. The loomcycle-ws-worker image replaces the builder sidecar, and the plain denngubsky/loomcycle image replaces the toolbox image, with commands running on a worker whose session image carries the toolchain.

We also added an architecture test: only a short list of packages (the conversion worker, MCP stdio, the transcription helper, the workspace engine on the worker role, the CLI and two test helpers) may start an OS process at all.

9. The short migration note

If you ran agents with Bash, the guide in docs/MIGRATING-FROM-BASH.md maps every variable, field and bundle. For most setups it comes down to this:

  1. Run loomcycle doctor on v1.171 first. Its "Deprecated" check lists every use in your config.
  2. Remove LOOMCYCLE_BASH_ENABLED and the other retired variables.
  3. Turn on workspaces: workspace.mode: local on a single trusted machine, or attach workspace workers (with the container engine for untrusted code).
  4. Replace Bash in each agent's tools with Workspace and give it a grant.
  5. Move any shell credential into an egress route and name the route in the grant.

Before and after, from the guide:

# before (refuses the start on v1.172.0)
agents:
  coder:
    tools: [Read, Write, Edit, Bash]
    shell_credentials: [CRM_TOKEN]
# after
workspace:
  mode: local
  egress:
    routes:
      crm:
        url: "https://api.crm.example/v2/"
        credential: "$cred:crm_token"
agents:
  coder:
    tools: [Read, Write, Edit, Workspace, File]
    workspace: {ops: [read, write, exec], open: true, egress: [crm]}

If you selected sandbox,dev-exec in LOOMCYCLE_PRESETS, select dev-workspace instead and stop the old sidecar container. loomcycle import claude-code now leaves Bash out of imported agents with a warning; it does not map it to Workspace for you.

Removing a tool that every framework treats as standard felt strange for about a day. Then we looked at what was left: a runtime that holds the secrets and makes the decisions, and workers that run the commands and hold nothing worth stealing. That split is what a kernel is supposed to give you.

The workspace is also simply a better place to work. It can outlive a run, fork for each sub-agent, serve a page to a person, look at its own screenshot, and push a branch without ever seeing the token. Bash could do none of that.

If your upgrade refuses to start, read the error: it names every line. If the migration guide leaves something unclear, tell us.