Skip to Content

Stash

A Stash is a workspace tile that collects snippets — clips — from anywhere else in the workspace and forwards them on. It’s a side surface for the bits of output you want to hang on to: a test failure to feed back to an agent, a URL from a preview, a stack trace to paste into a terminal, a paragraph to keep pinned while you work.

Buckets, Not Tiles

Clips live on the workspace, not the tile. Each Stash tile holds a { bucketId } pointer; the bucket and its clips live at workspace.stashBuckets. Closing the tile preserves the bucket — a new Stash tile can re-attach to the same bucket by passing the same bucketId at creation, and the clips reappear unchanged.

This means a Stash tile is cheap to close and reopen. It also means two tiles can view the same bucket if you want to keep clips visible across desktops.

Reopening a Closed Stash

Because closing a tile and deleting its content are different actions, there are two paths back to a bucket you’ve closed:

  • Undo toast — the moment you close a Stash with content (clips, notes, or a name), a toast appears with an Undo button. One click re-adds the tile, pointing at the same bucket. The toast disappears after 8 seconds.
  • Reattach picker — clicking Add Tile → Stash with one or more detached buckets in the workspace opens a picker listing them by recency, with a preview of the first clip. You can reattach to any bucket, start a fresh one, or permanently delete a bucket (two-click confirm).

An entirely empty bucket (no name, no notes, zero clips) is auto-cleaned when its last tile closes — there’s nothing worth surfacing, so it stays out of the picker and doesn’t trigger the toast.

Clipping Into a Stash

Once a Stash is open anywhere in the workspace, right-click a tile with a text selection to see the Clip to Stash… section of the context menu. It lists Stashes on the current desktop first, then one submenu per other desktop. If the current desktop has no Stash, New Stash here spins up a fresh tile pre-populated with the selection.

Content types are inferred from the source tile:

  • Selected text from a terminal or agent is clipped as terminal content (preserves whitespace and ANSI-stripped output).
  • Selected text from anywhere else is clipped as text.
  • Preview tiles with no text selection fall back to a metadata clip carrying the port, path, and framework — useful for “save this URL” without selecting anything.

Every clip records its provenance: source tile id, source tile type, source title at clip time, and a server-stamped createdAt.

Inside a Stash

Each clip row supports:

  • Copy — copies content to the system clipboard.
  • Send to Tile — opens a destination picker (see below).
  • Delete — removes the clip; bucket persists.
  • Drag to reorder — drag the row by its handle. The persisted order is the source of truth, so reorders survive across sessions.
  • Rename — click the clip title to set a label; useful when several clips look similar in their first line.

Bucket-level controls:

  • Rename the bucket by double-clicking the header.
  • Notes — a collapsible markdown-ish prose field pinned next to the clips (capped at 4000 chars). Use it for “what these clips are for”, links to issues, or a running log of context. Saved on blur or ⌘/Ctrl+Enter; cleared with an empty value.
  • Sort toggle — flips the displayed order between asc (oldest first) and desc (newest first). View-only; the persisted order doesn’t change, so drag-reorder remains meaningful.

Sending Clips Out

The per-clip Send to… picker forwards a clip into another tile. Destinations are filtered by what can accept an input:

  • Agent / Terminal — the clip is published on the workspace Context Bus as command:execute, which feeds it into the agent’s stdin or the PTY. Matches the existing “send to agent” behavior — auto-submits.
  • New Quick Lane — starts a throwaway quick lane running your primary agent and hands it the clip as its first instruction.
  • Stash — atomic clip add via the bucket-keyed REST route, preserving the source provenance from the original clip. Useful for moving clips between buckets without losing their lineage.

Other tile types (preview, for example) are filtered out — there’s no input surface to forward into.

Persistence Model

Clip CRUD and bucket-level fields are server-authoritative and atomic. Each mutation hits a dedicated route under /workspaces/:id/stashes/:bucketId[/clips...] so two concurrent writes can’t race a read-modify-write on the array. After every mutation the tile pulls fresh workspace state, so what you see in one tile reflects what another tile (or another browser tab) just did.

Agent Surface: Narrow By Design

Stashes are an operator-curated surface. The agent-side surface is intentionally narrow:

  • studio.list_stashes — read the buckets in the workspace (id, name, clip count).
  • studio.read_stash — read the clips in one bucket (text, title, source). Pages through clips with each body capped at 8,000 chars; clipId returns one clip in full. Errors with the bucket list on ambiguity and never creates a bucket.
  • studio.save_to_stash — push one text clip into a bucket. Auto-creates an Agent Clips bucket if none exist; errors with the bucket list on ambiguity.

Everything else — renaming a bucket, editing notes, reordering clips, sending clips into another tile, deleting a bucket, rebinding a Stash tile to a different bucket — is UI-only. Those are curation choices the operator owns. An agent that wants a “fresh” bucket can call studio.save_to_stash with a new bucketName — the server auto-creates a named bucket that doesn’t exist yet (even when other buckets do), and only errors when two or more existing buckets already share that name (pass bucketId then).

This split keeps the Stash a low-noise side surface — agents can read clips and push output in, but they can’t reshape the bucket layout out from under the operator.

From the Media Lab

The Media Lab tile (upload images/video/audio and process them with an AI vision model) can send its processed output straight into a Stash: after a run, click the clipboard icon on the output panel and pick a Stash (or New Stash). The resulting clip carries a provenance chip back to the source asset (e.g. 📎 bug-repro.mp4), so a text clip can point at the binary it came from without copying any bytes.

See Tiles for the full tile catalog and Workspace MCP Server for the surfaces agents can create.

Last updated on