Chain-of-thought folds

Each reasoning step folds one idea into the next. Real attempts define which folds are likely; a Markov chain Monte Carlo sampler then explores every chain of thought the agent could take, the way origami configuration spaces are sampled.

Fold graph

current samplereal attempt #9never observed
start → ssh_exec P = 0.593 · sampled 0.0%start → think P = 0.222 · sampled 0.0%post_incident_note → observe P = 0.353 · sampled 0.0%post_incident_note → verify P = 0.353 · sampled 0.0%ssh_exec → observe P = 0.885 · sampled 0.0%observe → post_incident_note P = 0.193 · sampled 0.0%observe → ssh_exec P = 0.281 · sampled 0.0%observe → think P = 0.193 · sampled 0.0%observe → verify P = 0.281 · sampled 0.0%think → ssh_exec P = 0.727 · sampled 0.0%verify → ✓ pass P = 0.407 · sampled 0.0%verify → ✗ fail P = 0.407 · sampled 0.0%startstart visited in 0% of samplespost_incident_noteact:post_incident_note visited in 0% of samplesssh_execact:ssh_exec visited in 0% of samplesobserveobserve visited in 0% of samplesthinkthink visited in 0% of samplesverifyverify visited in 0% of samples✓ passpass visited in 0% of samples✗ failfail visited in 0% of samples

Folded chains

Current MCMC sample· 8 folds · total surprise 5.1
fold 0ssh_exec0.52 nats
fold 1observe0.12 nats
fold 2ssh_exec1.27 nats
fold 3observe0.12 nats
fold 4ssh_exec1.27 nats
fold 5observe0.12 nats
fold 6verify1.27 nats
fold 7✗ fail0.43 nats
Real attempt #9 (failed)· 8 folds · total surprise 5.1
fold 0ssh_exec0.52 nats
fold 1observe0.12 nats
fold 2ssh_exec1.27 nats
fold 3observe0.12 nats
fold 4ssh_exec1.27 nats
fold 5observe0.12 nats
fold 6verify1.27 nats
fold 7✗ fail0.43 nats

Crease angle = surprise of that fold (−log P). Sharp creases are unusual jumps from one idea to the next; mountain and valley folds alternate, keeping the strip flat.

Most visited chains

Run the sampler to estimate which chains of thought dominate.

How it works

  • States are kinds of steps: think, act with a tool, observe a result, get verified.
  • Folds are transitions between them, with probabilities learned from the 4 real attempts (smoothed, so unseen folds stay possible).
  • Energy of a chain = total surprise of its folds, plus β if it ends in failure. Chains are sampled with probability ∝ e−E/T.
  • Metropolis–Hastings proposes refolding, inserting or removing a step, or flipping the outcome, and accepts with probability min(1, e−ΔE/T × proposal ratio).
  • Inspired by Hikaru Kuribayashi's MCMC sampling of origami and linkage configuration spaces (Regeneron ISEF 2026).