agentleFS
LangChainKnown publisherlangchain-ai/open-swe/mda/bundled_skills/workspaces/SKILL.md

workspaces

Skill11k starsChanged 16 days agoMITView on GitHub

How a Robin workspace's sandbox image works and how to change it — create one, edit or fork an existing one, start from scratch, what setup_script and update_script are for, why a nightly refresh failed, where the build logs are, and how to read a rebuild in progress. Read this whenever someone asks about workspaces, snapshots, sandbox images, or a refresh, whether or not this is an admin thread.

5 other projects use a version of this.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about langchain-ai/open-swe

The biggest 5 of 75 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 75

Talked about on GitHub, YouTube, Bluesky, Hacker News and the web (75 times).

On GitHub · 50

45 more on GitHub

On YouTube · 9

4 more on YouTube

On Bluesky · 9

4 more on Bluesky

On Hacker News · 4

On the web · 3

Used with

Projects with it also use connections.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • stacksyncdataSkill

    connections

    Lists, creates, reads, renames, shares, reauthorizes and deletes Stacksync connections, reads the live tables and columns of a connected app, and explains network options and app rate limits. Use when someone wants to connect an app or database, a connection expired or needs reauthorization, a teammate cannot see a connection, a connection must be deleted, someone asks which tables or fields an app has, or a database sits behind a firewall or in a private network.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only workspace admins can change a workspace's image, from an admin thread or through supported writes in a verified sole-writer shared …

    line 14
  2. Distinctive:

    If the asker is not an admin, tell them what would need to happen and who can do it.

    line 17
  3. Very specific:

    Write it non-interactive and safe to re-run: start with set -euo pipefail.

    line 57
  4. Distinctive:

    Never write a secret to disk — the proxy injects git auth per run.

    line 58
  5. Distinctive:

    Keep it to seconds. It runs in three places:

    line 63
  6. Distinctive:

    In a run's own sandbox: when it boots from an image older than an hour, before the first model call, so the run works against fresh …

    line 67
  7. Distinctive:

    Never fatal — a failure is logged and the run continues on the image as captured.

    line 68
  8. Very specific:

    Read it with snapshotctl(action="status") or background_task("status", task_id), which report the stage reached — boot, setup, update, …

    line 75
  9. Distinctive:

    Check in at intervals; do not poll in a loop.

    line 76
  10. Very specific:

    When it fails: the stage that broke is marked failed with its exit code, error names the script, and output is the log.

    line 78

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workspaces

A workspace prefers repositories and owns Slack channels, MCP connections, and team settings, plus the sandbox image its runs boot from. Preferring a repository routes its GitHub and Linear events here and preloads it into the image; it does not limit access, since every workspace's sandbox can reach every repository the GitHub App installation can. That image is two things: a record (name, prompt, repos, sizing, optional scripts) and a published sandbox image, <prefix>-environment-<slug>:latest. Runs routed to a workspace boot from its image and get its prompt appended to their system prompt. The workspace named default is what a run uses when routing picks no other.

Only workspace admins can change a workspace's image, from an admin thread or through supported writes in a verified sole-writer shared thread. Shared writes return only acknowledgements; workspace reads and switching to another workspace's image still require a private admin surface. Anyone can read workspaces on the Workspaces page. If the asker is not an admin, tell them what would need to happen and who can do it; do not try the tools.

The one rule: build here, publish from here

You do not write a workspace's image as a script and hope. You build it in the current thread's own sandbox with ordinary tools — execute, the file tools — and when it works you call publish_workspace. That captures this sandbox as the image and writes the record only after the capture succeeded. Nothing is half-written on failure, and the image is usable the moment the call returns.

Everything on the sandbox filesystem is captured, so provision it fully and leave no tokens, credentials, or proxy secrets on disk.

Which image to start from

The image you publish is whatever you are sitting on plus your changes, so start the admin thread on the right one:

You want to…Start the admin thread…Then
Edit a workspace's imagein that workspace (composer → Workspace picker)change it, publish_workspace under the same name
Fork one into a new workspacein the parentchange what differs, publish_workspace under a new name
Build from scratchin no workspace, or recreate_sandbox(source="base")provision everything, publish

Already on a private admin surface and need a different image? recreate_sandbox(workspace=<slug>) with a slug from list_workspaces. The old sandbox is detached, not deleted.

setup_script — the reproducibility contract

Optional. It is not the build; you already did the build by hand. It is the record of how to reproduce the image from the base snapshot, and when present a nightly cron replays it on a throwaway sandbox and replaces the image only if it exits 0. Anything you did by hand that the script does not do therefore shows up as a failed refresh on the Workspaces page rather than as silent drift. snapshotctl(action="rebuild") runs the same check on demand.

Two consequences:

  • The script must describe the whole build from base, even for a fork. By hand you only did the delta on top of the parent; the nightly does not start from the parent.
  • Leaving it off is allowed. The workspace then has no nightly check and keeps whatever image was last published.

Write it non-interactive and safe to re-run: start with set -euo pipefail; clone the preferred repos listed in OPENSWE_WORKSPACE_REPOS into /workspace/<repo>, where runs expect every checkout (runs clone any other repository on demand); install rg, gh, toolchains, dependencies; warm caches. Never write a secret to disk — the proxy injects git auth per run.

update_script — keeping a live image fresh

Optional; typically git pull plus a dependency sync. Keep it to seconds. It runs in three places:

  1. At the end of every full rebuild, so a broken one is caught on a builder.
  2. In a run's own sandbox when it boots from an image older than an hour, before the first model call, so the run works against fresh checkouts. Never fatal — a failure is logged and the run continues on the image as captured.
  3. As an hourly update refresh — boot from the current image, run it, capture — enqueued by that same creation, so later runs skip step 2.

Reading a refresh

A rebuild takes minutes to an hour and runs on a throwaway builder, not the thread's sandbox. snapshotctl(action="rebuild") returns status: "started" and a task_id; it is not done. Read it with snapshotctl(action="status") or background_task("status", task_id), which report the stage reached — boot, setup, update, capture — and, while a script is running, a tail of its live bash -x trace. Check in at intervals; do not poll in a loop.

When it fails: the stage that broke is marked failed with its exit code, error names the script, and output is the log. The previous image stays in place — runs never drop to the base snapshot because a script broke. Fix the script with snapshotctl(action="edit"), which needs no sandbox and returns the previous values so the edit can be undone, then rebuild again. snapshotctl(action="history") shows who changed the workspace and when; stop cancels a rebuild that is going nowhere.

Logs are written under /open-swe/environment/logs/ (setup.log, update.log) with the scripts beside them, and are captured into the image — so any sandbox booted from a workspace's image can read how it was built.

Snapshot names

The name belongs to the workspace, not to whichever sandbox produced the image: every publish and every refresh moves the same latest tag. Runs boot from the immutable snapshot id on the record, so a capture mid-run cannot change what a reconnecting sandbox comes back to. Override the name with snapshot_name on publish; it must not contain a colon.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.