Skip to content

blog: fork — branching for durable streams#4104

Open
balegas wants to merge 11 commits intomainfrom
blog/fork-branching-for-durable-streams
Open

blog: fork — branching for durable streams#4104
balegas wants to merge 11 commits intomainfrom
blog/fork-branching-for-durable-streams

Conversation

@balegas
Copy link
Copy Markdown
Contributor

@balegas balegas commented Apr 8, 2026

Summary

Draft outline for the fork release post. Fork adds branching to Durable Streams — a new stream from any point in an existing one, instant, single API call. Live on Electric Cloud.

The post is structured as a release post with published: false. Inline HTML comments guide the author on each section's purpose and tone. The author proses up the outline in place.

Structure

  • TLDR — what shipped and why
  • Why branching — context on the gap (LangGraph, ChatGPT, academic work, git/database branching analogy)
  • How fork works — mental model + API walkthrough with AI chat example
  • Get started — links to docs, cloud
  • Coming next — open invitation for use cases
  • Meta footer (commented) — intent, title/description/excerpt briefs, image prompt, asset checklist, open questions

Still needed

  • Author proses up the outline
  • Title, description, excerpt (briefs in commented footer)
  • Header image (use /blog-image-brief)
  • Diagram: conversation tree showing fork branches
  • Demo video/link when companion demo is ready
  • Confirm doc links (protocol spec, API docs)

Verification

Preview locally:

cd website && pnpm dev
# Navigate to /blog/2026/04/09/fork-branching-for-durable-streams

Post has published: false — won't appear in production builds.

Files changed

  • website/blog/posts/2026-04-09-fork-branching-for-durable-streams.md — new draft post

🤖 Generated with Claude Code

balegas and others added 2 commits April 9, 2026 00:30
Draft outline for the fork feature release post on Durable Streams.
Structured as a release post with inline guidance comments for the
author to prose up in place. Published: false.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add parallel paths and compaction diagrams to the fork blog post.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
balegas and others added 2 commits April 9, 2026 15:26
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix /docs dead links to /docs/intro in fork post
- Move SVG diagrams from static/ to public/ (VitePress convention)
- Remove old plan file with dead links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 9, 2026

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit ab3b333
🔍 Latest deploy log https://app.netlify.com/projects/electric-next/deploys/69d7df9414f76a0008bc4045
😎 Deploy Preview https://deploy-preview-4104--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

balegas and others added 4 commits April 9, 2026 15:52
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix "durable object" → "durable stream"
- Replace compression example with rewind, fan-out, and
  "ask without polluting history" use cases
- Add Scratch contexts subsection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@thruflo thruflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. Generally, we should match this with a docs page for "Forking and branching" on the Durable Streams site. So these usage examples can be minimal and must link to fuller, more exhaustive canonical docs on the docs website.

---
title: 'Fork: branching for durable streams'
description: >-
Durable Streams is the session primitive for agent infrastructure. Fork adds branching — go back to any point, explore parallel paths, compact without losing history. Live on Electric Cloud.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the excerpt is a better description.

excerpt: >-
Agent sessions need branching. Fork adds it to Durable Streams — branch from any point, fan out across agents, compact aggressively without losing history. One API call, live on Electric Cloud.
authors: [balegas]
image: /img/blog/fork-branching-for-durable-streams/header.jpg
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a) with this image crop vertically slightly

Could you push chatgpt to generate a slightly higher quality image, more realistic, atmospheric? Here's an example image prompt that really stresses / pushes the image generation. Claude can write these well:

<style>A high-resolution macro photograph looking inside the open chamber of an experimental three-dimensional photonic computer mid-computation. 1536 by 950 pixels, 16:9 aspect ratio, mastered as a high-quality JPG. The visual register is hyperreal scientific photography fused with the precise sci-fi futurism of Tron Legacy interiors, the reactor chambers of Annihilation and Arrival, and the open photonic test rigs of advanced silicon photonics laboratories. Reference also: the cover of a Nature paper on three-dimensional photonic integration, the IBM quantum computer chandelier, free-space optical bench setups with visible laser interferometry, and the stacked die photography of Intel Foveros and TSMC CoWoS chiplet packaging. Hard sci-fi, not fantasy. Mathematical, clean, monumentally precise, three-dimensional, volumetric. Painted by light, not by hand.</style>

<setting>The entire image takes place inside the open inner chamber of a three-dimensional photonic computer. This is not a flat chip surface — it is a volumetric enclosure perhaps the size of a shoebox seen at extreme macro range, with real depth of field stretching from the immediate foreground into a soft far background several  hundred millimetres deep. The chamber is bounded above and below by stacked layers of polished dark silicon photonic dies separated by transparent glass interposers and  connected by vertical copper through-silicon vias and short fibre-coupling pillars. Multiple horizontal silicon planes are visible at different depths, each etched with  its own pattern of waveguides, each glowing faintly with cyan laser light leaking out of its edges. Between the planes, in the open volume of the chamber, free-space optical interconnects cross the air as visible coherent cyan beams, travelling vertically and diagonally between dies. The chamber walls are dark polished silicon and anodised carbon composite. The camera is positioned inside the chamber at a low three-quarter angle, looking up and across the volume so the viewer feels suspended inside the apparatus, not looking down at a board.</setting>

<agent_loop>Dominant in the central two-fifths of the frame, suspended vertically in the open volume of the chamber and presented nearly face-on to the camera so its geometry is completely unmistakable: the Durable Streams logo rendered at scale as a true static dataflow graph in coherent laser light. The form must be exactly and recognisably the Durable Streams logo from the brand assets — a perfectly circular ring composed of exactly sixteen identical wedge-shaped slices arranged radially around a small central hub, each slice the shape of a thick triangular pie segment with a flat outer rim and a sharp inner point at the hub, with a thin dark gap of empty space between each slice and the next. The slices fade gradually in opacity around the ring exactly as in the logo: brightest and most fully saturated at the top of the ring, dimming progressively around the circumference, dimmest at the bottom — this opacity gradient is itself a defining characteristic of the logo and must be obvious. The ring is large in the frame, occupying most of the vertical height of the central focal plane, and is held in space by a sculpted dark silicon mounting bracket at its hub. Each of the sixteen wedges is a discrete coherent beam of brilliant cyan laser light (hex value #75fbfd) emitted from a tiny photonic source at the central hub, projecting outward through a slot-shaped aperture in the bracket to form the wedge shape in mid-air as a volumetric beam of pure light. The wedges are sharply edged, hard volumetric, with faint coherent diffraction shimmer at their boundaries and visible flow inside their bodies. At the outer rim of the ring the sixteen beams curve through micro-mirrors mounted on a thin circular silicon halo and re-enter the next wedge along, physically closing the loop. The viewer must recognise this immediately as the Durable Streams logo at first glance.</agent_loop>

<inference_engine>Filling the depth of the chamber behind and around the agent loop, fused to it with no boundary between them: a true three-dimensional inference engine  built from stacked photonic processing elements. Multiple horizontal silicon dies are visible at progressive depths receding into the chamber, each die etched with a regular rectilinear grid of identical Mach-Zehnder interferometer cells — a chessboard of glowing diamond cells, each cell two parallel cyan waveguides meeting at a beam  splitter — extending the full surface of every die. The dies are stacked vertically in the chamber, separated by transparent glass interposers, perhaps four or five layers deep, so the lattice repeats through the volume of the computer like the floors of a tower. Cyan laser light flows horizontally across each die and vertically between dies through optical through-silicon vias, with bright nodes at every cell where beams interfere. The lattice is unmistakably a regular three-dimensional grid, not a scatter of nodes and not a curving neural network — it is a volumetric tensor core, a stacked systolic array. The depth of field falls off softly into the far layers so the deepest dies dissolve into atmospheric cyan haze, suggesting the lattice continues further than the eye can resolve.</inference_engine>

<fused_dataflow>This is the central visual thesis of the image and must be unmistakable. The cyan laser beams of the agent loop do not stop at the rim of the ring. Several wedges of the ring project their beams forward and outward into the open volume of the chamber as free-space coherent cyan beams, travelling through the air across the chamber and entering the leftmost columns of the stacked inference lattice as input beams. The beams travel through the lattice from cell to cell and from die  to die, processed in flight by interference at every Mach-Zehnder cell and routed vertically between layers through optical TSVs, and emerge from the rightmost columns of the deepest dies as new coherent cyan output beams. Those output beams curve gracefully back through the volume of the chamber along free-space return paths that arc up over the top of the lattice and back into the wedges of the loop on the opposite side of the ring, completing the cycle. There is no chamber boundary, no memory store, no mediating buffer between the loop and the lattice — it is a single continuous photonic circuit walked by one continuous flow of coherent cyan light through three-dimensional space. Discrete bright pulses travel along the beams in legible direction: brilliant cyan packets flowing outward from the loop into the lattice (spawned work), softer cyan packets flowing back from the lattice into the loop (returned results). The loop and the inference engine are two regions of one fused spatial dataflow graph and the photons cross the boundary between them as if the boundary did not exist, because it does not.</fused_dataflow>

<light_and_colour>The cyan of the laser beams (hex value #75fbfd) is the only saturated colour in the image and it is the dominant light source. The beams of the loop, the beams of the lattice, and the free-space beams crossing the chamber all glow the same precise turquoise. Cyan rim light spills onto the dark silicon dies, the glass interposers and the carbon composite chamber walls beneath every beam, casting cool reflections in the polished surfaces and modelling the etched walls of the waveguide channels in turquoise. Thin volumetric haze fills the open chamber, just enough to make the free-space beams visible as travelling shafts of light without softening their hard volumetric edges. The depth falls off into a cool blue-black ambient darkness in the deepest reaches of the chamber. A second light source is used sparingly: a very subtle warm rose-gold accent (hex value #FF8C3B) catches the very furthest right edges of a few of the lattice cells and the outermost rim of the loop's central hub, providing a single complementary warm note to anchor the otherwise entirely cool palette. The warm accent must be restrained, perhaps two or three percent of the image's total luminance, used as a counterpoint to make the cyan sing rather than as a competing colour. No other colours. No purples, no greens, no yellows. Everything else is cyan, black, and the deep cool blue-grey of polished silicon.</light_and_colour>

<material>Polished dark silicon for the photonic dies and the chamber walls. Transparent glass interposers between the dies, with subtle internal refraction of the cyan beams passing through them. Anodised carbon composite for the structural members of the chamber. Vertical copper through-silicon vias and short fibre-coupling pillars between dies. Sculpted silicon mounting brackets holding the agent loop ring face-on in the central volume. Tiny photonic components at the nodes: micro-mirrors at the rim of the loop, beam splitters at every MZI cell of the lattice, fibre-coupling fiducials at the die edges. These components are sculpted from polished silicon and rendered with the precision of an electron-microscope photograph restated in colour. The cyan beams themselves are pure coherent light: hard volumetric edges, internal flow, faint diffraction shimmer, no fuzzy bloom and no neon haze beyond a thin atmospheric carrier in the chamber air. Everything is hard-surface, clean, precise, sub-millimetre engineering visible at extreme macro range inside a real volumetric chamber.</material>

<composition>A wide three-quarter view from inside the chamber of the photonic computer, camera positioned at a low slightly elevated angle looking up and across the open volume so multiple layers of stacked silicon dies are visible at progressive depths. The Durable Streams logo ring is suspended vertically and face-on in the centre  of the frame, dominant in the central two-fifths of the image, large and unmistakably recognisable as the logo. The stacked inference lattice fills the volume behind and around the loop, receding through several layers into the far background. Free-space cyan beams cross the open chamber between the loop and the lattice and arc back over the top to close the circuit, drawing a complete three-dimensional dataflow visible at a glance. All load-bearing content lives within the inner seventy percent of the frame so the image survives a 1200 by 630 centre crop and a square crop. The upper region of the frame above the loop stays relatively clean and atmospheric — soft cool darkness with hints of distant chamber structure — because the website overlays the post title in that region. Generous breathing room on all four edges. The composition has real volumetric depth: foreground, middle-ground holding the loop, multiple receding planes of inference dies in the background.</composition>

<mood>Mathematical, precise, monumentally beautiful, quietly awe-inspiring. The viewer is suspended inside the apparatus at the moment of computation itself, at the instant the agent loop and the inference engine become one fused three-dimensional spatial dataflow graph executing in light. There are no characters. No human figures. No mood lighting beyond what the beams themselves emit. This is not a scene — it is a volumetric window into a piece of apparatus more advanced than anything that exists  today, captured with the calm descriptive clarity of a scientific photograph and the visual confidence of a master concept artist. Reverent without being theatrical.</mood>

<constraints>Absolutely no text, no numerals, no letters, no signage, no logos other than the Durable Streams sixteen-wedge ring form itself, no watermarks anywhere in the image. The Durable Streams ring must be rendered with strict geometric precision and must be immediately recognisable as the Durable Streams logo: a perfectly circular ring of exactly sixteen identical wedge-shaped beams of cyan laser light arranged radially around a central hub with a thin dark gap between each beam and the next, with a clear opacity gradient from brightest at the top to dimmest at the bottom of the ring. The ring is presented nearly face-on, large in the frame, dominant in  the composition. The inference lattice must be a regular rectilinear three-dimensional grid of identical Mach-Zehnder interferometer cells stacked across multiple silicon dies in the depth of the chamber, not a random scatter of nodes and not a neural-network-style graph of curving lines — it is a volumetric tensor-core stack. The  image must have real three-dimensional depth: it is the open chamber of a photonic computer with stacked silicon layers and free-space optical interconnects, not a single flat board surface. Absolutely no flywheels, no mechanical parts, no leather, no iron, no steampunk, no architectural framing, no robot characters, no human figures, no sky, no horizon, no buildings of any kind. The cyan must be the precise turquoise hex value #75fbfd. The warm accent, used sparingly, must be the precise rose-gold hex value #FF8C3B. Master as a high-quality JPG.</constraints>

published: true
---

Durable Streams is the session primitive for agent and multi-user applications. We're extending it with fork: go back to any point in a session and try a different path, fan out across multiple agents from shared context, or compact aggressively without losing history.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Durable Streams is not "the session primitive for agent and multi-user applications" it's "the data primitive for the agent loop".

Hyperlink stuff together. Durable Streams to the DS website, data primitive for the agent loop to the data primitive for the agent loop blog post.

Generally it's worth really sweating the intro sentences and making sure they don't read like an LLM. It's the "is this AI slop or not" value decision for the reader.

balegas and others added 2 commits April 9, 2026 17:57
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@balegas
Copy link
Copy Markdown
Contributor Author

balegas commented Apr 10, 2026

I've opened durable-streams/durable-streams#325

- Rewrite opening sentence with canonical "data primitive for the
  agent loop" framing and hyperlinks
- Update title to "Fork — branching for Durable Streams"
- Rewrite description and excerpt, drop compression claim

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@balegas
Copy link
Copy Markdown
Contributor Author

balegas commented Apr 10, 2026

Thanks @thruflo. Addressed in 123ddae:

  • Title → "Fork — branching for Durable Streams"
  • Opening sentence rewritten with canonical framing and links
  • Description + excerpt reworked, dropped the LLM-tell and compression claim

Image crop/regeneration skipped for this pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants