Context nodes
A context node takes a session and turns part of it into a portable text payload. That payload is how work moves between sessions without copy-paste.
Palette → nodes → context, or select messages in a transcript and extract them in place.
| Glyph | Kind | Produces |
|---|---|---|
| ≡ | distilled-summary | An AI-condensed brief of the whole transcript |
| ❝ | transcript-excerpt | Raw conversation text, filtered |
| ▤ | files | A manifest of the files the session touched |
≡ Distilled summary
Section titled “≡ Distilled summary”The transcript is rendered, then piped through claude -p with a fixed brief: goal, current state, key decisions and why, files touched, unresolved issues, exact next steps — markdown only.
| Field | Default |
|---|---|
| model | sonnet |
| extra instructions | empty — e.g. “focus on the API design decisions” |
It runs as a job, so progress shows in the run log.
❝ Transcript excerpt
Section titled “❝ Transcript excerpt”No model call — just a filtered render.
| Field | Options |
|---|---|
| roles | user · assistant (both on by default; system messages always pass) |
| tool calls | none · names only · full I/O |
| thinking | off by default; renders as a blockquote when on |
| max chars | unlimited; truncation appends […truncated] |
| range | message indices, inclusive — cleared with clear |
Set a range by selecting messages in the transcript view and extracting the selection: that drops a wired excerpt node labeled Excerpt 3–9.
▤ Files / artifacts
Section titled “▤ Files / artifacts”A markdown table of operation | path for every file the session touched. snapshot file contents also inlines the text of written files (reads are skipped, and oversized or binary files are left as manifest rows only).
Materializing
Section titled “Materializing”A context node is inert until it has a payload. The node subtitle says not materialized, or materialized · <first 8 of hash> once it does.
Wire a session in, open the inspector, press Materialize (Re-run to redo it). You get a token estimate chip and a preview of the payload.
Payloads are content-addressed: the hash is sha256(kind, provider, sessionId, content) and the JSON lands under ~/.config/threadle/payloads/. Identical extractions collapse to one stored file, so re-running a deterministic excerpt is free.
Stored payloads appear in the palette’s library tab (❝) and can be dragged back onto any canvas as an already-materialized context node.
Detached runs need a payload
Section titled “Detached runs need a payload”Interactive canvas runs materialize a context node during the run whenever a session is wired into it.
Detached and CLI runs cannot: extraction is refused up front.
detached run blocked — context "…" payload is missing (re-materialize or mute)So before threadle run, either materialize each context node once on the canvas, or mute it. Note that portable graph exports deliberately strip payloadHash — a shared workflow always arrives unmaterialized.
Loose ends flags the same thing earlier: wire a session source or materialize first.
Wiring
Section titled “Wiring”❯ Session ──▶ ❝ Context ──▶ ⟨/⟩ Agent ──▶ ⇤ Output (extract) (inject)- session / subagent-run → context is the extract edge; it picks the source. The context node reads sessions, it never rewrites them.
- context → agent prepends the payload to the agent’s prompt under a
# Handed-off contextheading. - context → session is the inject edge. During a canvas run an opencode target receives the payload as a synthetic message (inserted, no reply). Claude and Cursor targets are deliberately manual — implicit forking would spawn a session on every run — so use the Inject button on the session node. The modal offers the modes that provider supports: resume-fork, new-session, continue, synthetic.
- context → output is refused. Route through an agent or a converter instead.
Context edges render in their own lane color, distinct from text and session wires.
Related
Section titled “Related”- Agents & sessions — sources and targets
- Skills & rules — the other way to inject text
- Loose ends — the readiness lint
- Graph & wires — canvas vs detached
- Run a workflow