Skip to content

Retain Claude idle-child accounting within owned process sessions #1980

Closed

Description

@currentbits

Implement #1959's design preserved in PR #1966. Steps:

  • Read audit/reproduction and Claude helper, runner and Store seams; coordinate persistence boundary with Persist verified Claude session accounting checkpoints across process restarts #1961.
  • Convert synthetic omissions into expected-correct fake-CLI/temp-Store regressions.
  • Add process-owned deduplicating collection and idempotent persisted contributions, preserving foreground behavior.
  • Run isolated accounting/lifecycle regressions and annotate review itinerary.
    No paid provider calls, live store edits or historical aggregation. Audit establishes retention gaps, not measured production billing loss.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Nov 9, 2026
  2. currentbits commented on Nov 9, 2026

    @currentbits
    OwnerAuthor

    Progress: merged audited PR #1966 baseline (this worktree predated #1956); converted 12 audit schedules to expected-correct regressions, now 17 passing including replay/coverage/reload/reap. Added process-epoch collector, retained source IDs, zero-turn idle writes, and idempotent Store contribution replacement. Found/fixed Stop's post-clear ownership race. Persistence currently keeps checkpoint-enabled usage thread ledgers in the authoritative envelope, avoiding side-file crash skew; no cross-process hydration (#1961 remains distinct). Checking sparse/zero/native dollars, midnight/legacy rows and foreground lifecycle/budgets next.

  3. added
    plan:done
    and removed
    plan:doing
    on Nov 9, 2026
  4. currentbits commented on Nov 9, 2026

    @currentbits
    OwnerAuthor

    Implemented audit #1959 / PR #1966 retention fix after merging the audited baseline (0aaf59ee). Process-owned collection survives idle/reuse and source enrichment; preserves IDs/parent/advisor/run provenance; rejects revoked/replaced/session-mismatched frames; background persistence adds zero turns and does not borrow another run's receipt/wasted-spend attribution. Store checkpoints replace only their epoch contribution, reconciling late SDK USD including zero without retaining fallback eligibility. Foreground approvals/questions/progress/context and budget behavior covered.

    Validation: isolated 21-file Claude/Store/budget/questions/plan/context/queue regression run, 323/323 passed; typecheck and diff check passed. Final focused 9 collector/temporary-Store and 24 fake-CLI audit regressions also passed. No paid provider calls, live store changes or historical transcript aggregation.

    Review itinerary written at .solenta/review-itinerary/77d83edf-bcdc-4ed6-9347-b155e33697fd.json. Known tradeoff: checkpoint-enabled stores retain the thread usage ledger inline; long-session checkpoint size/write performance is not measured. #1961 fresh-process continuity remains separate and open. Audit evidence remains a retention gap, not measured production billing loss.

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

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions