Skip to content

Long conversations hit the context wall silently — every follow-up then fails, with no warning and no repair path #70

Closed as not planned

Description

@bencode

Problem

A Gamma Reader conversation grows by design: it is titled, renamed, kept in history, restored with its draft, and meant to be returned to for weeks. Every turn sends the entire history to the model (create-reader-agent.ts:106 — messages: [...session.messages], no trimming, no accounting), and the web app never counts what that costs against the model's window: the only token references in features/conversation/features/agent are internal parameters (maxTokens in vision/title calls, a pagination cursor).

So the wall arrives unannounced. When a long conversation crosses the model's context window, every follow-up fails with a provider error string — and then fails again on retry, because retry resends the same overflowing history. There is no repair path in the product: the history menu offers Rename and Delete only (conversation-history.tsx), messages cannot be trimmed, and the assistant cannot be asked for a handoff exactly when one is needed, because past the wall it answers nothing in that conversation. The reader's only move is to abandon the thread and re-establish context by hand in a new conversation.

This is the candor gap #38 named for storage, in the assistant's memory: the product knows the model's window (its model list carries it), knows the history's size, and says nothing until the conversation dies.

Proposal

  • Show context pressure where the reader writes: a quiet indicator near the composer as the conversation's history approaches the model's window ("context is filling up"), the same candor the composer already practices elsewhere.
  • Add Continue in a new conversation (exact label) to the conversation's actions: the assistant writes a summary of the thread while it still can, and the new conversation opens with that summary and the same document attachments — the endorsed assistant-mediated path (Give conversations an export path — weeks of questions and answers live and die with the browser profile #50's close rationale), made into an affordance instead of reader folklore.
  • The old conversation stays intact and readable; continuing is a fork forward, not a delete.

Goal

After this, a weeks-long companion conversation never bricks silently: the reader sees it filling before the wall, and one action steps them into a fresh conversation that carries the thread and the documents — instead of an error and a manual restart.

Verification

grep -rqiE "continue in|continued from" ui-packages/web/src/features/conversation
pnpm --filter @gamma-reader/web test --silent
pnpm check

Refs

Activity

  1. added
    enhancement
    source:scheduled
    on Oct 2, 2026
  2. bencode commented on Oct 2, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), under the maintainer's standing instruction to evaluate, sharpen, or retire source:scheduled proposals.

    Evidence audit (against main@d94348b): all citations confirmed.

    • ✅ Full history on every turn — messages: [...session.messages] (create-reader-agent.ts:106), no trimming or accounting.
    • ✅ Token references in conversation/agent are exactly the internal parameters described (a pagination cursor; maxTokens: 200 in title generation) — no context-window visibility anywhere.
    • ✅ Repair path absent: history actions are Rename and Delete; no message trimming; retry resends the overflowing history, so the wall is permanent within the thread. The "silently bricks" framing is accurate.
    • ✅ The indicator's data prerequisite holds — model definitions carry contextWindow (visible in core/byok/runtime.ts:53's default shape).
    • ✅ Sensor: lint passed; verify fails today → stays open.

    Verdict: valid, keep open — the best problem statement in the queue. It names the exact failure mode (retry cannot repair, assistant cannot be asked for a handoff past the wall), and "Continue in a new conversation" correctly turns #50's close rationale (assistant-mediated summaries) into an affordance rather than folklore.

    Two implementation notes (non-blocking): (1) the pressure indicator should degrade gracefully when a model's window is unknown (custom BYOK entries) rather than guess; (2) the summary-writing step spends tokens when context is already scarce — the proposal's ordering (indicator before the wall, action available early) is the right mitigation, worth preserving verbatim in any implementation.

  3. bencode commented on Oct 2, 2026

    @bencode
    OwnerAuthor

    Progress note — the first half of this issue shipped in #74 (19cf67c): conversation/token-usage.ts now tracks a conversation's context size against the model's contextWindow, giving the pressure indicator the Proposal asked for. Still open on this issue: the Continue in a new conversation repair affordance (summary handoff + document attachments) — the Verification anchor targets that half and correctly still fails. No action taken; recording where the implementation stands so the remaining scope is unambiguous.

  4. bencode commented on Oct 13, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), under the maintainer's standing instruction.

    Verdict: superseded — closing as not planned. The problem premise of this issue is no longer true on main:

    • "The reader sees it filling before the wall" — shipped earlier in feat: show a conversation's context size and token usage #74: composer/token-usage-status.tsx shows Context: X of Y tokens (Z%) by the composer.
    • "No repair path in the product" — shipped in PR feat: /compact summarizes earlier messages so long conversations keep fitting the context #144 (2fc0e56, merged as part of f10f772): the conversation's command palette now has compact — "Summarize earlier messages to free up context". create-reader-agent.ts gains transformContext: projectContext(...), so a compacted conversation is sent as its summary plus the kept messages; the reader still sees every message, with an "Earlier messages summarized" divider that opens the summary (conversation-messages.tsx). token-usage.ts counts the projected context, so the pressure indicator reflects what is actually sent after compaction.
    • "The old conversation stays intact and readable" — compaction delivers exactly this: it repairs in place, keeping the thread, the documents and the full reader-visible history, rather than forking.

    Honest residual delta: what this issue proposed and main does not have is the specific fork affordance — a Continue in a new conversation action that seeds a new conversation with the summary and the same attachments. The Verification grep (continue in|continued from in features/conversation) accordingly still finds nothing, which is why this closes as not planned rather than implemented: the goal the fork served — a weeks-long conversation never bricks silently — is now met in place by indicator + compact, a mechanism that loses nothing the reader can see. If the fork itself is still wanted as a product affordance, that is a fresh design call for the maintainer, not an open defect.

    Evidence re-checked on f10f772; lint ✓; verify ✗ (anchor phrase absent, as expected for an unbuilt fork). @bencode — reopen if you want the fork affordance anyway.

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

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions