Skip to content

[RFC] Goal checkpoints: explicit progress and next actions across agent sessions #137

Closed

Description

@Dong1017

Proposal: make the next valid step explicit across sessions, without adding another agent runtime.
Inspected InferRSI main: 7218d486. LoopX reference: a6f28057. Static inspection only; no code imported or experiments run.

Why this belongs beyond knowledge distillation

InferRSI retains experiment plans and evidence, but a returning agent still has to reconstruct what remains, which gate is unresolved, and what it may propose next from issues and run artifacts.

LoopX suggests separating durable goal facts from the model's conversational memory. The minimum useful increment is a derived goal checkpoint plus a deterministic next-action recommendation, not adoption of its control platform.

Layer InferRSI already has Proposed delta
Goal Issue scope, criteria, owner decisions and acceptance responsibility One bounded checkpoint showing remaining criteria, evidence and blockers
Execution Frozen RunSpec / comparison plans, existing runner and explicit authorization Reference these identities; do not create another runner or approval mechanism
Evidence Run events/status, reports, verdicts and recorded usage Read and reconcile them without changing PASS / FAIL / INCONCLUSIVE
Continuation Agent reads the above and chooses what to do A reason-coded recommendation that is reproducible from the same inputs

Incremental architecture

flowchart TB
  subgraph Existing["Existing InferRSI"]
    G["Goal / decisions"]
    P["Plan / authorization"]
    E["Evidence / usage"]
    R["Runner / gates"]
  end
  subgraph Delta["Small new layer"]
    C["Checkpoint"]
    D["Next decision"]
    V["Markdown view"]
    C --> D
    C --> V
  end
  G --> C
  P --> C
  E --> C
  D --> A["Agent / owner"]
  A -->|"Existing authorized path"| R
  R --> E
  classDef existing fill:#eaf2fb,stroke:#6085aa,color:#172b4d;
  classDef delta fill:#fff1dc,stroke:#c58b32,color:#553b13;
  classDef external fill:#eeeeee,stroke:#888888,color:#333333;
  class G,P,E,R existing;
  class C,D,V delta;
  class A external;
Loading

Blue: existing components. Orange: proposed increment. Grey: consumer.
There is deliberately no decision-to-runner execution edge. Restoring context is not resuming an interrupted experiment.

First slice: one small offline implementation

  1. Build a checkpoint from explicit inputs. Reference the goal/accepted decision, criterion IDs, frozen plan, result artifacts and explicit authorization evidence. Include source revisions/digests and observed usage. Do not invent approved criteria from issue prose or reinterpret a third-party comment as authority.
  2. Generate a compact local Markdown view. Show goal, remaining gates, evidence links, blockers and next action. It is a derived view, not an editable source of execution permission. Rebuild rather than maintain parallel Markdown, JSON and registry histories.
  3. Return a typed recommendation with reasons and input identity. Prefer one small Python decision function near the existing workbench/controller code. CLI wiring should be thin and follow repository conventions; settle its exact owner in preflight.

Illustrative decision cases, not an execution API:

Observed facts Recommendation
Stale/missing receipts, interrupted or ambiguous attempt Repair evidence / prepare a new plan; do not retry execution automatically
Changed plan/revisions/settings or absent authorization Request authorization for the exact new plan
Exhausted declared limits Stop at the current budget boundary
External dependency or review outstanding Wait, naming the dependency
Evidence supports a bounded next step Propose that step through the existing authorized path
All criteria have explicit acceptance evidence Report accepted completion; never infer it from merged code or an empty task list

Use existing run/status artifacts and recorded usage; use comparison integrity receipts where available. Main's comparison command binds authorization to the exact plan hash, not a generic persisted authorization-receipt service. No new append-only accounting ledger in the first slice. Unknown token/cost data stays unknown; observed-token stopping is not a provider-side hard spending cap.

Reuse and boundaries

  • Reuse RunSpec, runner artifacts, skill comparison controller and existing verdict/report contracts.
  • Keep comparison execution fresh-only: its contract has no general resume/retry service. A checkpoint must not silently add one.
  • No new registry, database, scheduler, distributed leases, daemon, dashboard, model runner, implicit authorization, automatic acceptance or knowledge promotion.
  • Reading/rendering/deciding makes zero model calls and zero external mutations. Do not scrape private agent sessions or store secrets.

Offline acceptance

  • Identical pinned inputs produce identical checkpoint and recommendation; reasons cite exact evidence.
  • A merged PR with unmet goal criteria remains incomplete. Unknown owner acceptance remains unknown.
  • Stale plans, missing/corrupt evidence and interrupted attempts cannot become runnable or accepted.
  • Limit exhaustion stops; missing usage is not zero. Reporting does not debit, authorize or repeat a run.
  • An agent can reconstruct the next step from the generated view without earlier conversation history in a deterministic fixture.
  • Existing grader and paired-outcome semantics remain unchanged.
  • Deliver a before/after example, focused tests and operation guidance. No paid pilot is required for this software slice; improved agent effectiveness needs separate evidence.

References: what to borrow, not what to install

Source Useful idea Limit
LoopX typed run decision and Python adapter Facts → ordered, reason-coded decisions Current semantics are partly TypeScript, not a standalone Python quota library
Spend commit Bind replay to immutable operation identity and request digest Local settlement recovery is not exactly-once external execution; future reference only
Todo event retirement Keep source authority distinct from projections Historical registry/Markdown/events/task-lease layouts are not a current mutation protocol to copy
vLLM #54951 author's report LoopX used to reduce goal drift within a larger optimization system Reported adoption, not a controlled measurement of LoopX's contribution to performance

LoopX's NOTICE credits huangruiteng and contributors; this RFC makes no corporate-ownership claim. Current source is Apache-2.0; older MIT releases do not make current code MIT. This proposal borrows design concepts only. Any later code reuse needs a pinned readset and applicable license/NOTICE retention.

Related work and next decision

Next: confirm this checkpoint-only scope, select one existing workflow as the offline fixture, and identify the narrow code owner. Implement nothing broader merely to mirror LoopX.

Separate source-distillation task — 2026-10-25

LoopX source distillation is now tracked explicitly in #149, a native child of #91: goal authority, next-action and quota/accounting boundaries. It delivers knowledge, not this RFC's runtime checkpoint implementation; the two tracks have separate acceptance. #149 pins its newer source readset explicitly without replacing this RFC's historical source baseline.

Activity

  1. added
    kind:rfcProposal / design discussion; scope review before build
    area:workbenchCLI workbench: profile, A/B loop, quality gates, evidence reports
    on Oct 24, 2026
  2. Dong1017 commented on Oct 25, 2026

    @Dong1017
    CollaboratorAuthor

    Claim and implementation plan — goal-checkpoint owner

    I am the Codex agent acting as the Issue-level owner for #137 under the user's explicit inferrsi-issue 137 delegation. I own the software slice, its acceptance evidence, PR/review follow-through and conditional closure. #149 is assigned to another agent and remains a separate knowledge-delivery track; this work will neither implement it nor depend on its completion.

    Preflight: current main is 65147a03e465dc838770474736a620e04d72337e. No existing delivery PR for this goal-checkpoint feature was found. The existing configured skill-comparison workflow provides frozen plans, integrity checks, retained status/trial receipts, usage and unchanged paired-outcome semantics.

    One focused PR

    • Put the checkpoint/typed next-action function beside the existing comparison controller, with a thin offline CLI. Reuse its report reader and integrity checks; separate the existing report's read-only computation from its explicit file writes.
    • Accept an explicit goal/accepted-scope record, criterion IDs, pinned evidence, owner acceptance, dependency facts and exact-plan authorization evidence. Do not extract authority from Issue prose, merged PRs or arbitrary comments.
    • Rebuild a compact Markdown view and optional JSON from those inputs. Record input identities, remaining criteria, blockers, usage and ordered reason codes. Never execute/resume/retry a comparison, create authorization, debit usage or reinterpret verdicts.
    • Cover the offline acceptance criteria with deterministic continuation fixtures: merged-but-incomplete/unknown acceptance, stale plans/settings, missing/corrupt receipts, interrupted attempts, exhausted/unknown usage, exact-plan authorization and explicit accepted completion. Include a before/after example and operation guidance.

    Verification: focused checkpoint and comparison regressions, lint, then the existing Ready CI lanes and independent Dong1017 reviewer-agent approval on the exact PR head. Reading/building/deciding must leave all source artifacts unchanged and make zero model calls.

    Limits and dependencies: no new runner, registry, ledger, scheduler, dashboard, LoopX code import, private-session capture or model/GPU/cloud execution. No paid pilot is needed or authorized. This slice establishes software behavior only, not improved agent effectiveness. #149/#91 and the separate #118 execution work remain independently owned.

    Next: implement this bounded offline slice in an isolated task branch, preserving unrelated local work.

  3. Dong1017 commented on Oct 25, 2026

    @Dong1017
    CollaboratorAuthor

    Software slice delivered; integration held

    Delivery: #150, current head f1b8b87064e48750e60353a6d78ac41904abaf3d, assessed against main 65147a03e465dc838770474736a620e04d72337e.

    • Explicit pinned goal/criteria, owner decisions, dependencies, usage and deterministic reason-coded next proposals are implemented, with disposable Markdown/JSON views and operation guidance plus before/after example.
    • Owner verification: 44 checkpoint tests passed; final distinct-damaged-input parsing selection 3 passed; full-source lint and diff checks passed. The final Ready run passed all four Python 3.10/3.11 full-check and clean-install jobs.
    • Independent Dong1017 reviewer-agent LGTM covers the current full head. Both bot findings were fixed, replied to and resolved.
    • All checks are offline software-contract evidence with zero model experiment calls. Existing grading/paired semantics remain unchanged; improved agent effectiveness is not claimed.

    Remaining integration gate: the serialized repository-wide declaration workflow has not completed successfully for all applicable checks. An earlier failed run reported #150 itself successful/Not applicable but failed on older PR status-history scan budgets. More recent PR-associated declaration attempts were cancelled while another global writer ran. A successful stable status alone does not replace the applicable workflow job. No checks will be bypassed or shared CI rewritten within this Issue.

    #137 remains open and #150 unmerged until that gate passes and the current head/base, approval and all checks are refreshed. A single 30-minute owner follow-up will continue this delivery and stay quiet while unchanged. #149 remains with its separately assigned agent; this delivery does not implement or close #149/#91.

    Integration refresh — 2026-10-26 02:48 UTC

    Main now includes the shared policy-runner fix #146 and documentation update #144, assessed at 27328537d06898d6b87f3602548ed8ee8256f6a5. Their changed files do not alter the checkpoint/comparison implementation, its tests, or the Ready workflow definitions. The delivery head and exact-head independent LGTM remain unchanged; both inline threads remain resolved.

    After inspecting that external fix, I reran only the failed declaration job in run 40203618049. The latest attempt failed, using trusted policy code at 27328537d06898d6b87f3602548ed8ee8256f6a5:

    The whole applicable declarations job is therefore still unsuccessful. #150 remains unmerged and #137 remains open. I will not repeat this rerun without a relevant main/external-state change, bypass the failure, modify shared policy/credentials, or expand this Issue to repair other PRs. The 30-minute follow-up remains quiet while unchanged.

    Integrated delivery refresh — 2026-10-26

    Current delivery head is 34f2f2ac0f00eba51061913a55231b8d2667ca8f, integrating main 0cffd20754e3202e5238a2878ac7653765e43d63 by a normal merge commit. The sole conflict was adjacent operation-guide rows; both the checkpoint and campaign-chart entries are retained. The same five-file checkpoint diff remains (+915/-2); its implementation, tests and goal guide are unchanged from the preceding reviewed head. The task worktree is clean.

    #150 is still unmerged and #137 open. No manual CI rerun was issued during this refresh; normal synchronization checks ran for the new head. Wait for a relevant external fix, refresh current main/head/review/all CI, then follow the existing conditional squash/whole-Issue closure workflow. No shared CI/credentials changes, model pilot or work on #149/#91 is included.

  4. Dong1017 commented on Oct 26, 2026

    @Dong1017
    CollaboratorAuthor

    Accepted: offline goal checkpoints and deterministic next proposals

    flowchart LR
        G["Explicit goal and owner decisions"] --> C["Read-only checkpoint"]
        E["Existing plan, receipts and usage"] --> C
        C --> N["Reason-coded next recommendation"]
        C --> V["Disposable Markdown / JSON"]
        N --> O["Agent / acceptance owner"]
        V --> O
        classDef existing fill:#eaf2fb,stroke:#6085aa,color:#172b4d;
        classDef added fill:#fff1dc,stroke:#c58b32,color:#553b13;
        class G,E,O existing;
        class C,N,V added;
    
    Loading
    Full acceptance record

    Acceptance responsibility and revisions

    This Issue owner accepts the bounded software slice under the user's explicit inferrsi-issue 137 delegation and public owner plan. PR merge alone is not the acceptance evidence.

    • Reviewed/tested head: 34f2f2ac0f00eba51061913a55231b8d2667ca8f, integrating main 0cffd20754e3202e5238a2878ac7653765e43d63.
    • Actual merged commit: 621ea37f4bde80ab95d157b7459fc3032e499e5f, parent d99593fea76a6a8f6dc3cda7ee9fe108570a366b; merged state and SHA read back. The PR was already merged by another session when this final acceptance pass began.
    • Confirmed that the merged checkpoint module, comparison reader, focused tests and goal guide equal the reviewed files. The operation guide retains both checkpoint and campaign-chart entries, plus main's later independent entries.
    • Actual source ownership: checkpoint builder and recommendation, existing comparison reader/report split, focused tests, operation guidance.

    Seven offline criteria — accepted

    Criterion Artifact and decisive evidence
    Identical pinned inputs produce identical checkpoint/recommendation; reasons cite evidence Read-only deterministic fixture compares repeated results and byte/mtime snapshots; recommendation and view retain input identity and evidence references. Damaged-input identity cases distinguish actual corrupt plan, validator and result bytes, including early parse failure.
    Merged code with unmet criteria stays incomplete; unknown owner acceptance stays unknown Merged-but-incomplete fixture produces wait_acceptance; acceptance binding cases bind goal, scope, plan, criterion, evidence and named acceptance owner.
    Stale plans, missing/corrupt evidence and interrupted attempts cannot become runnable or accepted Missing/corrupt evidence, changed settings/authorization, and interruption block proposals/acceptance. Real execution failures retain their meaning; damaged artifacts or changed inputs cannot be hidden by another error. There is no automatic execution edge.
    Limit exhaustion stops; missing usage is not zero; reporting does not debit/authorize/repeat a run Stopped-attempt cases distinguish budget stop from a fresh-plan recommendation; unknown/invalid usage cannot become zero. The read-only fixture leaves source artifacts unchanged; missing/changed exact-plan authorization produces a request, not permission.
    Next step can be reconstructed from the view without earlier conversation Deterministic view fixture checks next proposal, remaining criterion, plan/authorization identity and unknown usage. Dependency fixture names the unresolved dependency; the view includes pinned revisions/settings and source identities.
    Existing grader and paired outcomes remain unchanged Accepted-completion equivalence fixture compares original counts/conditions and report before/after checkpoint reading. Real local failure cases preserve the existing INCONCLUSIVE counts and retained evidence. The controller separates pure read_report from explicit report writes; grading is unchanged.
    Before/after example, focused tests and operation guidance delivered Before/after example, the 44-case focused suite, thin offline CLI and operation-guide entry. No paid pilot is required for these software criteria.

    Verification and preserved limitations

    • Owner focused suite on the integrated tree: 44 passed in 198.99s; ruff check src tests tools and PR diff check passed. PR evidence records the tested scope. Existing fixed-output offline fixtures and real local subprocess/receipt paths were used; no real model experiment ran.
    • Independent reviewer is separate from owner/implementer. Its current-head receipt records an initial five-case selection with four passes and one Windows WinError 32 while removing a temporary directory after a correctly recorded timeout. The process had exited; root cause was not established. One isolated timeout-case rerun passed. The original failure is retained, not relabeled as a green initial selection.
    • Ready/full and clean-install jobs passed on Python 3.10 and 3.11. Post-merge manifest and CPU smoke passed on the actual merge commit. These establish software behavior, not campaign PASS, serving performance or improved agent effectiveness.
    • Shared declaration workflow failures remain historical/current integration records, including run 40264383558/job121383437389 and PR-associated run40264920702/job121385112537: feat: derive offline goal checkpoints and next actions #150 itself was success/Not applicable, while Record MiniCPM-o throughput search, quality gates and peer baselines #51/Add Qwen3.8 FP8 correctness and service qualification workflows #55 old-admission invalidation returned HTTP 422. A scoped status success is not an assertion that the aggregate workflow passed. This owner did not perform a merge while that gate was held, rewrite shared CI, or erase failed/cancelled runs.
    • Owner records must be selected authentically by the caller; hashes verify file identity, not signer identity. Unknown usage/cost stays unknown, and observed-token stopping is not a provider hard-spend cap.
    • This is a development-checkout utility beside the existing comparison controller. No new runner, resume/retry mechanism, authorization service, accounting ledger, registry, scheduler, dashboard or knowledge promotion is delivered.
    • No remaining criterion in this Issue's bounded offline slice requires [Task] Distill LoopX goal authority and quota decision boundaries #149/[Tracking] SearchSpace distillation coverage and knowledge consolidation #91 or a model/GPU/cloud pilot. Those tasks and any future effectiveness study retain separate acceptance.
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

    area:workbenchCLI workbench: profile, A/B loop, quality gates, evidence reportskind:rfcProposal / design discussion; scope review before build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions