Repository navigation
Move the Forks guide into How it works as a tab, rewritten at half the length - #6317
Merged
Merged
Conversation
…s into the note How it works is the guide for the mechanism's reader, and the Forks page was one more chapter of it: it labelled itself "how it works", linked back there, and sat beside it at /forks/ only because #5961 gave the design a page of its own while half of it was unbuilt. It now stands as the Forks tab, between Threads and Keys, at /how-it-works/#forks. The tab describes what is built: the line fork, the working fork behind LEAF_FORK_WORK=on, who holds a message, who a command acts as, how a fork's run ends, follow-ups and the main thread as coordinator. The built/planned tags and the status table are gone. What was planned (the three-way sort, a to-do for significant work, one standing fork per session) moves to notes/fork-replies.md, step 4, as AGENTS.md places a design not yet built. The sorting table keeps its two built judgments, and decisions once addressed to "you" now give their reason to the reader. Code and the note point at the tab. The test that holds the sorting and endings tables to forks.ANSWER and forks.Ending now reads them from How it works.
…r slips a fresh read found The tab called the agent's first line in a thread the "working message" where Workflow and Progress say "working line", and its glossary defined the latter. It also said "this page", broke hand_over across two lines in the sorting table, called the follower "the lane" after saying the code alone does, and left acknowledgements out of the acting diagram the table beside it lists.
leaf-agent
previously approved these changes
Nov 17, 2026
The tab came over from a design page and still read like one: a 13-term glossary before any mechanism, 25 private function names in its prose where other tabs name at most six, decisions argued against their alternatives, Claude Code version stamps and eval evidence, and the same rule (a running fork keeps its thread's further messages) stated four times. It drops from about 4,900 words to 2,500. - It opens with why forks exist: the session's own first words in a thread take a median 35 s and 140 s at p90 on real pages, where a fork's working line takes 2.4 s, set as three metric tiles. - Terms are defined where they first appear, and the glossary goes. - The path flowchart and the holding diagram showed the same thing; one diagram now draws the three states a waiting thread is in, as forks.py's header names them. The acting flowchart repeated the table beside it, and the coordinator diagram the paragraph under it; both go. - Function names move to "Where each rule is written". - The reasons Leaf tells the main thread in clerk's lines rather than the fork's SendMessage move to forks.py's header, the decision's home, which the tab and the note now point to. The reasons a fork names its own turn and is spawned unnamed were already there. Ids that readers' comments or other tabs point at (path, sorting, take, holding, acting, ending, endings, telling, follow-ups, coordinator) stay.
…wap the endings flowchart for the table in its order A second fresh read of the rewritten tab found: - the endings flowchart overflowed a 390 px column, and only restated the table beside it. The table now lists the outcomes in the order Leaf tries them, and the flowchart goes; - it said a plugin's hooks never run for a spawned fork, though hooks.json's PostToolBatch does; it is the hooks module's tool-call hooks that don't; - it said a running fork's turn holds a thread's unpicked messages, where holding.py counts any running agent turn, line turns included; - it said a thread never has two forks, though a later message can start a new one; a thread has at most one at a time; - it used "follower", "clerk's lines", HAND BACK: and "worker" before defining them, or never did; - its states caption counted three states in a figure of four boxes; - it said a line fork returns in 2 to 3 s beside a measured 4.0 s; - it gave one reason for spawning forks unnamed, where forks.py gives three.
…is kept back, and when a flurry goes to one fork
# Conflicts: # docs/forks.html
leaf-agent
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Forks page (
/forks/) was a chapter of How it works at its own address: it called itself "how it works", linked back there, and was split off only because #5961 gave a half-built design a page of its own. This moves it into How it works as a Forks tab between Threads and Keys (/how-it-works/#forks), deletesdocs/forks.html, and rewrites the tab for a reader of that guide at half the length (about 4,900 words to 2,500).The tab describes only what is built. The planned parts (the three-way sort, a to-do for significant work, a standing fork per session) move to
notes/fork-replies.md, step 4. It opens with why forks exist, as three metric tiles: the session's own first words in a thread take a median 35 s and 140 s at p90 on real pages, against 2.4 s for a fork's working line. Terms are defined where they first appear instead of in a glossary. One diagram draws the three states a waiting thread is in, asforks.py's header names them, where two overlapped. Diagrams that restated a table or paragraph are gone, the endings flowchart included, whose table now reads in the order Leaf applies it. Function names move to "Where each rule is written". The tab says "working line" as Workflow and Progress do. It carries the summary fork that #6318 added to the old page while this was open. The reasons for telling the main thread in queued lines rather than the fork's SendMessage move intoforks.py's header, which already held the tab's other decision records.Worth a look: the tab strip, whose tenth tab puts Runtime behind the overflow chevron at a 1440 px window, and whether the planned parts belong in the note rather than on the site.
Max asked why Forks wasn't in How it works, then for the tab to be improved. Two fresh reads of the rendered tab checked its claims against
forks.pyandholding.py, and their findings are fixed.tests/model/test_product_page.pyandtests/model/test_forks.pypass; the tab's three diagrams draw at 1440 and 390 px with no sideways scroll, broken anchors or duplicate ids.