Skip to content

context-graph: track and analyse memory served to and used by the model #463

Description

@antejavor

Problem

Context Graph serves memory to the harness's model through read tools — sessions-graph's recall today, resources-graph's resource(address) as designed in Map: Resources component. We have no way to see what was served, whether the model actually used it, and whether it saved anything (e.g. a re-fetch avoided). Without that, we can't tell useful memory from noise, tune retrieval, or show the cache earns its keep.

Context from the Resources component design

  • Every resource call records a Touch marked served from memory with an outcome: hit, subsumed (answered from a broader cached listing), or miss (What a Resource cache hit means).
  • A miss followed by a real fetch (WebFetch / gh / MCP) is first contact; a hit followed by a real re-fetch of the same address means the model judged memory too stale — both are observable as Touch sequences.
  • A PreToolUse nudge tells the model an address is in memory; whether the model then switches to resource is observable too.
  • Touches are private to their user (HAD_SESSION); any analysis must respect that scoping.

Questions to answer

  • What to record per serve: which tool, what was returned (Resource / memory rows), outcome, size.
  • How to detect use: did the served content influence the next actions/answer (cited, acted on, ignored, overridden by a re-fetch)?
  • Which signals are analysis (reporting-only) vs. inputs to retrieval/refresh behaviour.
  • Where it lives: per-component, or a shared served-memory record across recall and resource.
  • Relationship to the eval harness (context-graph/eval) — offline benchmark vs. live usage analytics.

No activity

Activity on this issue will appear here.

Activity

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

    needs-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions