[FEATURE] context-health monitoring

Status Open
Maintainer reply None cached
Activity 15 comments · opened Jun 10, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

(applies to Chat UI and TUI)

At some point during a conversation, earlier replies from the model or the user are no longer available to the model resulting in a mismatch in context between the user and the model. The user believes their reply is clear based upon their earlier conversation and the model silently doesn't remember that the earlier conversation ever existed.

The only user-available workaround is an in-band ledger, and that it doesn't even work, because this surface preserves HTML comments but renders them visibly.

Proposed Solution

Expose, natively and to both the user and the model, (1) per-turn model identity, (2) context occupancy or position in the window, and (3) a truncation flag when earlier turns fall out of context — so neither party has to improvise an in-band ledger to know the state of the channel they're talking over.

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

14 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/63403
  2. https://github.com/anthropics/claude-code/issues/49226
  3. https://github.com/anthropics/claude-code/issues/58254

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

renesugar · 2 months ago

This is about knowing when context is lost; not how much context is left. The user and model stop reasoning over the same facts when context is lost. This is also about the current model in the conversation knowing if there has been a downgrade in the model being used.

renesugar · 2 months ago

Easy repro for model downgrade: "Update: you can get blocked by Fable's biosecurity flags for just two emoji 🦠🧬"

https://x.com/baym/status/2064764719429189689

<img width="773" height="1062" alt="Image" src="https://github.com/user-attachments/assets/ac893596-ad74-4e44-97ad-5a7e44636081" />

renesugar · 2 months ago

<img width="602" height="1088" alt="Image" src="https://github.com/user-attachments/assets/b8f83fe8-2b11-469a-8f95-233394f140f3" />

<img width="572" height="179" alt="Image" src="https://github.com/user-attachments/assets/3e4550d5-4dc3-4d2f-a5e3-342c4834a962" />

renesugar · 2 months ago

Note the downgrade to Opus 4.8 for this task:

<img width="821" height="1247" alt="Image" src="https://github.com/user-attachments/assets/9171d860-00d6-4c19-9601-e20edf42a00d" />

renesugar · 2 months ago

<img width="561" height="923" alt="Image" src="https://github.com/user-attachments/assets/64d354f3-2487-404c-aed8-271aa2a3679b" />

renesugar · 2 months ago

<img width="576" height="1032" alt="Image" src="https://github.com/user-attachments/assets/0344b5e8-63eb-4732-85ac-1f9c764a3ffe" />

renesugar · 2 months ago

<img width="646" height="1101" alt="Image" src="https://github.com/user-attachments/assets/1e833603-14b3-4641-8d42-912300a2dc20" />

<img width="642" height="204" alt="Image" src="https://github.com/user-attachments/assets/b7b0a5af-e62d-47bb-a54c-b262a0d05bd3" />

renesugar · 2 months ago

<img width="710" height="990" alt="Image" src="https://github.com/user-attachments/assets/e218a90c-31e3-4077-a222-df5ac4903b5b" />

renesugar · 2 months ago

<img width="824" height="873" alt="Image" src="https://github.com/user-attachments/assets/9b43482d-1ca1-4fd3-8bfd-9a0b9be154f5" />

renesugar · 2 months ago

<img width="727" height="648" alt="Image" src="https://github.com/user-attachments/assets/392e1189-c42d-4b1d-9bef-0a810fb2a1a6" />

renesugar · 1 month ago

Feature request: conversation context checkpoints, health monitoring, and portability

Problem. Long LLM conversations degrade invisibly: established facts get lost on
compaction, the user and model drift onto conflicting premises without noticing, and
conversational state is locked inside one client. Users can't see, correct, or carry
the context the system is working from.

Proposal. Treat conversation context as a first-class, user-visible object:

  • Context checkpoints — auto-generated structured state (facts, decisions,

constraints, open questions), where each fact carries provenance
(user-asserted / assistant-claimed / jointly-confirmed / inferred).

  • Health monitoring — always-visible capacity, staleness, and checkpoint-freshness

signals; always checkpoint before compaction.

  • Inspect & edit — users can view the checkpoint, fix wrong facts, pin critical

ones, and delete stale ones, taking effect on the next turn.

  • Divergence audit (fast follow) — flag when a new message contradicts an

established fact or silently builds on an unconfirmed claim, so premise conflicts
surface instead of compounding.

  • Portability — export = transcript.md + checkpoint.json in a versioned,

client-agnostic schema; any conforming client can resume the session.

Client surfaces. Shared engine, two frontends: terminal clients store checkpoints
as files in the project (editable in $EDITOR, diffable via git, scriptable, hooks
into existing /compact + CLAUDE.md/AGENTS.md conventions); chat UIs wrap the
same format in a side panel, structured editor, and inline divergence banners.
The file format is canonical — the UI is chrome over it.

Phasing. P0: checkpoints + inspect/edit + health + export/import (terminal first).
P1: divergence audit, diffs, scriptable access. P2: distill memory maintenance into a
small specialist model; evolve the checkpoint schema via a benchmark-driven meta-loop.

Full spec with requirements, acceptance criteria, metrics, and open questions:

feature-request-context-management.md

renesugar · 1 month ago

One implementation of being able to save the chat transcript and artifacts here:

https://github.com/renesugar/agentchat

renesugar · 1 month ago

Another implementation:

Unibase Memory

One AI Memory across ChatGPT, Claude, Gemini, and the web

"Sync, search, share and manage your AI context in one private memory workspace. Send the right context into any AI chat in one click. Local-first and encrypted. You choose what to save, what to send, and whether to sync encrypted backups through Unibase Storage + DA."

https://www.unibase.com/memory

https://x.com/Unibase_AI/status/2072201423786578345

Showing cached comments. Read the full discussion on GitHub ↗