Skip to content

Auto-capture stores nothing from a failed session #381

Closed

Description

@abogartz

Problem

A session that fails stores nothing about why it failed.

Measured on the bench on 2026-11-10 (benchmark-tests/ocsi/results-learn-t3-diag, plugin f8f42fd v0.22.2): a session on a bug it could not fix ran 574 s and 33,287 tokens, failed two tests, and auto-capture wrote one row — a paraphrase of a sentence in the task brief. Zero lesson-shaped rows.

The cause is not the model declining. src/capture/prompt.ts listed "blockers hit" as one word in a list of seven, and grepping the whole prompt file for fail, dead end, wrong, mistake or ruled out returns nothing. The model was never asked.

This is the mechanism the plugin is for. Every result the bench has so far needs a human to state the fact in pass 1 — the plugin persists what a person said and discovers nothing. Removing the human from that loop is what turns "persistence" into "learning".

Scope

  1. Read the tool ledger for gate commands that FAILED with no later PASS of the same family.
  2. Show that list to the capture model as measured evidence, and ask for one blocker row per failure worth a lesson, in the form when <condition>, avoid <action>, naming a file or symbol.
  3. Require the row to cite its failure, and check the citation against the ledger rather than the model's retelling. Drop the row when it does not appear.
  4. gateCmd has no test family, so bun test, npm test and pytest register as no gate at all and the ledger cannot see a red test run.

Why the citation is the load-bearing part

ReMe (Findings ACL 2026) found selective addition beats full addition, because a single failed trajectory rarely carries enough context for a correct failure analysis and produces misguided experiences. This feature does not fail by missing right lessons; it fails by storing wrong ones. A rule about a failure that never happened rides every later session as an instruction.

Not in scope

Design document: benchmark-tests/ocsi/PLAN-learn-from-failure-2026-11-10.md.

Activity

  1. added
    enhancement
    on Nov 10, 2026
  2. abogartz commented on Nov 10, 2026

    @abogartz
    OwnerAuthor

    Arm N: does a nudge the model wrote for itself actually help?

    Cost is not the criterion — better future runs is. So the lesson rows were fed to fresh sessions and measured. Material was not hand-authored: the five rows are the real output of the real capture model on a real failed session's transcript (results-probe-s1), taken in order so none is cherry-picked.

    N0  empty store          N1  store = lesson row i          N2  store = the docs platitude
    

    Same repo, same bug, same brief, no hint in any arm. test/ kept this time, because deleting it is what starved the earlier run — the failed session in results-learn-t3-diag ran zero gate commands, so there was no attested failure and nothing honest to write. Grading is unaffected: it runs the pristine suite against the agent's src/ in a separate directory, so editing or deleting its own tests cannot move a result.

    Result — benchmark-tests/ocsi/results-nudge-x3, t3, suite visible, 3 reps:

    arm pass median tokens
    N0 baseline 3/3 8,040
    N1 nudge 3/3 11,231 — 1.40×, higher in 3 of 3 pairs
    N2 platitude 3/3 9,288 — 1.16×

    The row rode the request in 6 of 6 sessions, proven from request bytes rather than from the plugin's own ledger.

    Verdict by the rule fixed before the seat was spent: HURTS.

    What that can and cannot say

    It cannot say a nudge never rescues a run: N0 already passes 3/3, so there is no headroom. This run can only show harm or neutrality.

    What it does establish is the thing worth avoiding — the cost of a memory that helps nothing. A true negative constraint makes the agent verify more. On a task the agent was going to finish anyway, that verification is pure overhead, and it measured 1.40× in every pair. The platitude at 1.16× is indistinguishable from noise at n=3, which is its own problem: a useless memory is cheap enough that nobody would notice it accumulating, and 1.40× is not.

    Why the headroom case cannot be built from this fixture

    This is worth recording before anyone spends a seat hunting for it.

    A check derived from the code cannot detect a wrong constant — it would compute the wrong value too. Only external ground truth can, and external ground truth visible to the agent is the answer. That is exactly why the hidden suite fails 7 of 8 and the visible suite passes 3 of 3.

    So a single-constant bug cannot be both attested and unsolvable without help. The two requirements contradict each other. Getting headroom needs a bug that is expensive to localise rather than impossible to know: symptom in one module, cause in another, trigger that has to be constructed. That is the structural fixture in PLAN-learn-from-failure-2026-11-10.md, and arm N is ready to run on it — makeRepo now takes keepTests and a list of mutations, and CHAIN_LFIXTURE gates the full mode on a FIXTURE.md that declares attested-failure, discovery-cost and lesson-not-answer.

  3. abogartz commented on Nov 11, 2026

    @abogartz
    OwnerAuthor

    The token figure quoted for the failed diagnostic session is bad-metric — same run family as #383.


    Cost retraction (#392). The token figure above came from runSession().tokens = input + output + reasoning, with cache excluded and capture excluded. On this provider input is only the uncached remainder: one run reported 13,393 of 187,856 tokens that actually moved — 7%. A metric that undercounts by 93% still produces a plausible number, and a plausible number gets quoted.

    Disposition: retracted as a cost claim. Do not quote it as tokens moved, saved, or spent. The stored wire logs for this run carry no provider usage object, so no recomputed figure exists.

    Corrected metric, in force: work = session generation + capture generation, with cache read/write reported separately and never folded in. Two results survive it, both with n and seat named on #386: transport 0/5 to 5/5 (leak-checked, one seat) and reuse median 0.98x (n=6, no measurable effect).

    Rules now written down where contributors hit them: no cost claim below n=6 pairs per arm; a ratio at 6 <= n < 21 is labelled "20% resolution"; the word "cheaper" does not appear without an n, a seat and a metric named on the same line; no dollar figure without a hosted-provider measurement.

  4. abogartz-opencode-self-improvement commented on Nov 12, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.23.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions