ThinkingCap
ThinkingCap Research And Development Tapestry Seamstresses — long work now leaves the loom without leaving your sight

Seamstresses — long work now leaves the loom without leaving your sight

Published 2026-09-16 Updated 2026-11-09 ThinkingCap
Research And Development

Seamstresses — long work now leaves the loom without leaving your sight

What changed, in one paragraph: the loom has a third kind of worker. Alongside the Designer (who talks with you) and the Tailor (who runs the room), there are now Seamstresses — named agents who take long, settled work away and build it autonomously while you change focus to something else. A new WORKBENCH tab in every loom is where you watch them: up to three chairs, each with a name, a focus, and a live transcript you can open with one click.


Using it (the short version)

conversation has produced settled long work, the Designer dispatches a Seamstress with a complete written work order. The conversation is what makes the work order good; a button would bypass it.

Penelope, Beatrice, Alice. The name is how you refer to the work: "what's Penelope doing?"

Designer, who relays it in the loom in her own words at a natural moment: "Penelope is asking whether the sampler dedupes by learner or by course — would you like to pause what we're doing and ask her back in?" Your answer travels back the same way, or you type it straight into her Workbench reply box.

status, focus, live progress, elapsed time. Click for her full transcript. Reply / Pause / Resume / Recall are your controls. Finished Seamstresses sit "off the bench" below with their outcomes.

who's working.

(seamstress/penelope-a1b2); review the diff, push when satisfied. Nothing an agent writes ever reaches a real repo on its own.


Under the hood

The moving parts

PieceWhereWhat it is
Agent loopsrc/workers/seamstress.tsPolls the seamstresses table every 5s, runs up to 3 concurrent Seamstresses. Each "segment" is up to 80 LLM rounds (Sonnet, tool-use loop), then she pauses for breath.
Data planesrc/services/seamstresses.tsThe seamstresses Postgres table, dialog, expert roster, the Designer's garment block.
Room relaysrc/services/seamstressRelay.tsHer ONLY channel to the room. Writes relay rows to the Fabric and wakes the Designer (debounced) when the loom is quiet.
Designer toolssrc/lib/worktreeTools.tswt_dispatch_seamstress / wt_message_seamstress / wt_recall_seamstress — the Designer's entire seamstress surface, on the existing worktree tool surface.
RESTsrc/routes/seamstresses.tsList / transcript / reply / pause / resume / cancel for the Workbench. No dispatch endpoint (see above).
UIfrontend/src/components/main/content/WorkbenchPanel.tsx + mode wiringThe tab: 5s poll while anyone's active (15s idle), plus seamstress_event ws pushes.

How her work shows in the Fabric

Everything a Seamstress does is ordinary Fabric — conversation_messages rows, same as every other loom record — but in her own conversation, not the loom's main one. At dispatch she gets a conversations row of her own (execution_mode='seamstress'), which keeps her hundreds of working rows out of the main chat and Fabric views while remaining fully queryable. The Workbench's transcript view is simply that conversation read back in order.

Her rows carry distinct message_types so projections can tell them apart:

message_typeWhat it is
seamstress_dispatchThe work order, as row one of her transcript.
seamstressHer own narration — what she's doing and why, in the Weaver's terms. This is also the source of the one-line "progress" on her Workbench card.
seamstress_toolOne compact line per tool call (sm_edit_file(src/x.ts) → Edited (2 anchors)…) — the story stays readable without dumping file contents.
seamstress_expertAn expert's answer to her direct consult (metadata carries the advisor's name).
seamstress_dialogAnswers from the room (Weaver or Designer) as they arrive.
seamstress_done / seamstress_cancelledTerminal markers with her summary / recall reason.

The loom's main conversation gets exactly one new row type: seamstress_relay — her reports, addressed to the Designer and marked ("…her report to the Designer, not the Weaver speaking"). That's the only thing of hers that ever touches the room's Fabric. (The message_type allow-list is a CHECK constraint on conversation_messages; the migration in scripts/seamstresses.sql extends it.)

The relay — how she "never interrupts"

Her report path is mechanical, not polite-by-prompt:

  1. Worker writes a seamstress_relay row into the loom's conversation (question,

done, breath-pause, failed, recalled — with kind + her id in metadata).

  1. If the loom is streaming, nothing else happens yet — the row waits in the

Fabric; a 15s debounced re-check fires only when the loom goes quiet (10-min cap; after that the next natural turn carries it anyway). Multiple reports while busy collapse into one wake.

  1. When quiet, the relay calls startStream() with a fixed "workbench bell"

instruction (committed as another seamstress_relay row). The Designer reads all waiting relay rows in her garment and relays each to the Weaver in her own words — that's the "would you like to pause what we're doing and ask her back in?" moment.

  1. The Designer's system prompt carries a Seamstress block (built per-turn by

buildSeamstressBlock()): who's at the bench, their status, and the protocol — relay in your own words, carry answers back with wt_message_seamstress, never answer for the Weaver unless it's already settled in the Fabric.

Answers come back through wt_message_seamstress (Designer) or the Workbench reply box (Weaver): appended to her dialog jsonb, written into her transcript, and if she was paused she flips back to pending — the worker resumes her with the answer folded into context.

The agent loop, concretely

UPDATE SKIP LOCKED)` — oldest first, max 3 running, single-process worker.

totals) → up to 80 rounds of messages.create with her sm_* tools → persist text to her transcript as it lands → tool results back in. Every 5 rounds the harness is saved; old tool results are elided before saving (files are on disk — she can re-read them), so pause/resume and process restarts are exact.

holds. A cancel sets an in-memory kill signal plus a DB status — both checked per round and per tool call.

note to the room. A runaway can't run away.

a relay to the room. Her shop and branch survive everything, always.

Her tools and the gates

Her surface is sm_* (read/list/write/edit/delete, run_command, git_status, git_diff, commit, ask_expert, ask, done) — a sibling of the Designer's wt_* worktree surface with the same three gates:

  1. Blast radius — every path contained to her shop (lib/pathContainment).
  2. Git is the Weaver's — she can sm_commit checkpoints on her own branch;

no push tool exists.

  1. No infrastructure — sm_run_command shares the worktree whitelist

(npm/dotnet builds and tests, read-only git).

Deterministic helpers get first claim. sm_run_command routes through routeViaHelper() — the same agent-ops helper router the Designer uses — before local execution: a live helper's stdout is the tool result, exit 42 falls through to her shop, a helper failure is the tool error. As the helper registry graduates more families, her calls are absorbed with no seamstress change. The gates are absolute, though: a whitelist-refused command gets no helper path — a push helper would break Gate 2, a VM helper Gate 1. Her other tools are deterministic by construction (fixed git/fs argv; the agent supplies only text).

Expert consults

At dispatch, her roster is frozen from the loom's Fabric: every advisor with an expert_voice row in the conversation that led to her work (cap 6, stored on her row as experts jsonb). sm_ask_expert(name, question) fires a one-shot haiku call in that expert's persona (same model and voice style as the loom's expert rounds), writes the exchange to her transcript as a seamstress_expert row, and returns the answer as the tool result — she never pauses for it. Experts are for domain questions; scope and priorities still go to the room via sm_ask.

The table

seamstresses (
  id uuid PK, loom_id text → looms, name text,
  status text CHECK (pending|running|paused|success|failed|cancelled),
  focus_subject text, spec text,
  repos jsonb,            -- [{full_name, friendly_name}] (0–2)
  experts jsonb,          -- roster frozen at dispatch
  conversation_id uuid → conversations,   -- her transcript
  dispatched_by text,     -- 'designer' (only path)
  progress text,          -- one-liner feeding the Workbench card
  dialog jsonb,           -- Q&A with the room
  harness_state jsonb,    -- agent-loop state for exact resume
  result text, error text, pause_requested bool,
  created_at / started_at / updated_at / completed_at
)

Ops notes

chairs at the Workbench); DISABLE_SEAMSTRESS=true` keeps it off a host. Needs no Azure — Postgres, Anthropic, git only (deliberately NOT under the dresser's az-CLI gate).

Migration: scripts/seamstresses.sql (table + constraint extension) — already applied to the platform DB.

segments and 3-concurrent caps bound the blast radius; per-run token totals land in her completion summary.

Questions to Douglas — or ask the Designer in your loom; she knows the protocol.

Read this page as Markdown: https://console.thinkingcap.com/guest/Research-and-Development/Tapestry/Loom-Seamstresses.md
Same content, machine form. The whole corpus: /guest/all.md.