anomalyco / anomalyco/opencode

Session state drops non-technical/passive context blocks during multi-topic ingestion

Open
#43,635 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 20, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When supplying multi-topic context within a single session—specifically mixing system architecture notes (e.g., ChatPDF RAG setup) with document analysis (e.g., external LLM summaries of a paper)—the session context manager prioritizes technical/architectural tokens and purges the secondary analysis payload.

When explicitly requested to compare the current document against the previously ingested summaries, the assistant fails to retrieve them, stating the text was never retained in session memory.

This appears to be a context management / session-retrieval issue at the application layer rather than a model intelligence limitation. The session history manager/retrieval pipeline is prematurely evicting or failing to pass passive context blocks back into the prompt payload during multi-turn conversations.

Current Behavior:
User provides a multi-part prompt containing both technical architecture details and multi-LLM summaries of a document (e.g., Gemini, Grok, DeepSeek, ChatGPT outputs).

The system successfully builds context around the technical architecture.

Upon later prompting the system to compare its output with the previously supplied LLM summaries, the session responds with context loss:

"I don't have a prior summary of this paper in our session. Everything retained earlier was about the architecture... Paste the earlier LLM summary you're referring to..."

Expected Behavior:
All ingested context components (both system architecture details and external paper summaries) should be retained in session memory (active window or passive vector/kv-cache store).

The model should be able to cross-reference both topics when prompted (e.g., comparing a generated summary against the retained third-party summaries).

Environment & Context:
Context Type: Mixed domain payload (Technical Architecture + External Document Analysis).

Impact: Prevents multi-step reasoning across heterogeneous context sets within a single session.

Plugins

No response

OpenCode version

opencode 1.18.10 (the CLI running me; the model is deepseek-v4-flash-free)

Steps to reproduce

Initialize a new chat session.

Paste a context payload containing:

Payload A: System/RAG architecture details.

Payload B: External LLM summaries (Gemini, ChatGPT, Grok, DeepSeek) of a specific document/paper.

Discuss or iterate on Payload A (Architecture).

Prompt the tool to summarize the document and compare its output against the external summaries provided in Payload B.

Result: The system retains Payload A but reports no record of Payload B.

Image Image Image Image
Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.