Skip to content

mod: per-session load-proof marker #444

Closed

Description

@wasikarn

From #323 follow-up research. One line per session from hooks/mod/cost-ledger.ts.

Write a single marker (session id, CLI version, module loaded) on the first hook call, so "kill switch served off" can be told apart from "loaded but idle". Under -p the UI log only reaches the debug log, so write to the existing ledger path instead and let cost-report show a load-rate line. Same observer contract as the ledger.

Acceptance: unit test; cost-report prints loaded/total sessions; modules off means no row (the signal).

Activity

  1. added a commit that references this issue on Oct 4, 2026
  2. wasikarn commented on Oct 4, 2026

    @wasikarn
    OwnerAuthor

    Done in #446 (merged). The first hook call of each module load appends {t, session_id, loaded: true, cli, mh} to cost-ledger.jsonl. cost-report prints 'module loaded: N of M sessions since the first load marker'. With modules off, no row is written. Tests: 14 mod tests pass, test-cost-report.sh 27/27. The live claude -p check that a marker lands is still to run (steps in docs/reference/cost-ledger-module.md).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions