Skip to content

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 → nodescontext, or select messages in a transcript and extract them in place.


GlyphKindProduces
distilled-summaryAn AI-condensed brief of the whole transcript
transcript-excerptRaw conversation text, filtered
filesA manifest of the files the session touched

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.

FieldDefault
modelsonnet
extra instructionsempty — e.g. “focus on the API design decisions”

It runs as a job, so progress shows in the run log.

No model call — just a filtered render.

FieldOptions
rolesuser · assistant (both on by default; system messages always pass)
tool callsnone · names only · full I/O
thinkingoff by default; renders as a blockquote when on
max charsunlimited; truncation appends […truncated]
rangemessage 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.

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).


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.


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.


❯ 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 context heading.
  • 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.