You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hypothesis ledger: show what each agent tried and ruled out #303
Inspired by Datadog Bits AI's hypothesis ledger (every hypothesis classified validated / invalidated / inconclusive — you see what was ruled out, not just the winner).
For debugging threads and best-of-N runs, record and show the approaches each agent tried and rejected, with the reason. 'Ruled out' is information: it stops the next agent (or next run) from re-treading a dead end, and it feeds the failure-clustering and verification features.
Capture is agent-authored, never inferred. New hypothesis_record tool on the existing coder-threads MCP server: { threadId, projectId, claim, status: validated|invalidated|inconclusive, reason }. No transcript mining, no LLM pass, no scheduler.
Storage rides the thread: ThreadInfo.hypotheses (contract in src/shared/ipc.ts, capped 50 rows / 200-char claim / 500-char reason), written without bumping updatedAt — a ledger entry is not sidebar activity.
The ruled-out list feeds the next agent.hypothesisNoteFor joins planboardNoteFor / selfIdNoteFor as a standing note on every dispatched prompt, carrying the invalidated entries of the thread and its handoffFrom ancestors (10 lines max, deduped). That is what stops the next agent — or the next best-of-N fork — from re-treading a dead end, and it survives compaction because it rides every turn.
Surface: a read-only ledger card on the Agents tab, ruled-out group first, with claim, reason and age.
Two workers in flight on disjoint halves (electron/ and src/) off a frozen type contract.
Shipped on coder/hypothesis-ledger-show-what-each-agent-t-887a7e.
electron/services.js — recordHypothesis (validates status, trims/caps claim+reason, 50-row cap, no updatedAt bump) and hypothesisNoteFor (invalidated entries of the thread + up to 5 handoffFrom hops, deduped by claim, 10 lines).
electron/runner.js — the note joins planboardNoteFor/selfIdNoteFor on every dispatched prompt, so it survives compaction and resumed sessions.
electron/orchServer.js — hypothesis_record MCP tool behind the same assertSameProject guard, plus a line in the server INSTRUCTIONS telling agents to keep the ledger current.
src/hypothesisLedger.ts + Agents-tab card — ruled-out group first, claim / reason / age, rendered only when the thread has entries.
Tests: 19 new electron assertions (electron/test/hypotheses.test.js) + test/hypothesisLedger.test.ts. test:electron 992/993 (the one failure is the web-integration reconnect test that already fails on main), test:renderer 831/831, typecheck clean.
Dogfooded read-only against the live 304-thread store: no throws, no note on any existing thread, and a fabricated entry on a real handoff parent reaches its worker.
Not built: cross-sibling rollup for best-of-N (siblings start simultaneously, so one's dead end cannot reach the others in time) and any UI to edit or delete entries.
Activity
currentbits commentedon Aug 17, 2026
Design (implementation under way):
hypothesis_recordtool on the existing coder-threads MCP server:{ threadId, projectId, claim, status: validated|invalidated|inconclusive, reason }. No transcript mining, no LLM pass, no scheduler.ThreadInfo.hypotheses(contract insrc/shared/ipc.ts, capped 50 rows / 200-char claim / 500-char reason), written without bumpingupdatedAt— a ledger entry is not sidebar activity.hypothesisNoteForjoinsplanboardNoteFor/selfIdNoteForas a standing note on every dispatched prompt, carrying the invalidated entries of the thread and itshandoffFromancestors (10 lines max, deduped). That is what stops the next agent — or the next best-of-N fork — from re-treading a dead end, and it survives compaction because it rides every turn.Two workers in flight on disjoint halves (electron/ and src/) off a frozen type contract.
currentbits commentedon Aug 17, 2026
Shipped on
coder/hypothesis-ledger-show-what-each-agent-t-887a7e.electron/services.js—recordHypothesis(validates status, trims/caps claim+reason, 50-row cap, noupdatedAtbump) andhypothesisNoteFor(invalidated entries of the thread + up to 5handoffFromhops, deduped by claim, 10 lines).electron/runner.js— the note joinsplanboardNoteFor/selfIdNoteForon every dispatched prompt, so it survives compaction and resumed sessions.electron/orchServer.js—hypothesis_recordMCP tool behind the sameassertSameProjectguard, plus a line in the server INSTRUCTIONS telling agents to keep the ledger current.src/hypothesisLedger.ts+ Agents-tab card — ruled-out group first, claim / reason / age, rendered only when the thread has entries.electron/test/hypotheses.test.js) +test/hypothesisLedger.test.ts.test:electron992/993 (the one failure is the web-integration reconnect test that already fails on main),test:renderer831/831, typecheck clean.Not built: cross-sibling rollup for best-of-N (siblings start simultaneously, so one's dead end cannot reach the others in time) and any UI to edit or delete entries.
Merge pull request #337 from currentbits/coder/hypothesis-ledger-show…