Resident Repo: load-once, query-many million-token context sessions
A service that lets you upload a massive codebase once and ask questions about any part of it instantly.
A hosted context service where a customer uploads an entire codebase or document bundle (up to ~1M tokens) once; the service keeps it resident in a hybrid-attention model's KV cache and answers unlimited cross-file questions per session — no chunking, no retrieval, no drift.
Concept
An API product with three calls: Load(artifact), Ask(question), Release(). On Load, an entire artifact — a monorepo, a litigation bundle, a device's maintenance history — is tokenized into a single context of up to one million tokens in a hybrid-attention (CSA/HCA-class) model. The KV cache stays resident for the session and is reused across every Ask call, so customers pay one load fee plus cheap per-query tokens instead of re-processing the corpus on each question. The wedge: cross-file and cross-document questions that chunked RAG systematically fails — 'which modules read this config flag,' 'which witnesses reference this exhibit' — answered from one coherent context with no retrieval misses. Initial vertical: whole-repository code intelligence for migration and refactoring planning.
Why now
[0] shows DeepSeek-V4 makes 1M-token contexts routine: 27% of single-token inference FLOPs and 10% of the KV cache versus V3.2 at 1M tokens, with base long-context understanding at 51.5% on LongBench-V2 (vs 40.2% for V3.2-Base) — the economics of keeping a whole artifact resident have flipped. [1] shows KV cache sharing and key-value reuse cut the global KV footprint by up to 37.5%, the mechanism that amortizes one load across many queries. [6] (V3.2's DeepSeek Sparse Attention) is the lineage that made sparse long-context attention practical. [11] documents the alternative's failure mode: lightweight models doing multi-hop QA over many retrieved documents suffer hallucination and semantic drift — precisely what resident context avoids.
Written by GLM · 8 Nov 2026
AI assessment
A high-utility infrastructure play that leverages recent KV cache compression breakthroughs to replace unreliable RAG with resident long-context sessions for codebase intelligence.
- Evidence strength 5/5
- The idea is directly supported by DeepSeek-V4's massive reduction in KV cache (10%) and FLOPs (27%) for 1M tokens, combined with Gemma 4's KV reuse techniques.
- Market pull 4/5
- High urgency for software teams facing 'RAG drift' during complex refactoring, with clear high-value targets like Cursor and Sourcegraph.
- Novelty & moat 2/5
- The idea is very similar to the 'Repo-Context Review Engine' in the catalog, offering the same mechanism and user value.
- Feasibility 4/5
- With open-weight models like DeepSeek-V4 and Gemma 4 providing the architectural primitives, a hosted API wrapper is highly feasible.
- Wedge clarity 5/5
- The 'Load-Ask-Release' API for cross-file dependency analysis is a sharp, specific entry point that solves a known pain point.
- Simplicity / focus 5/5
- The product is a single, focused API service with a clear technical value proposition rather than a bloated platform.
Scored by Gemma 4 · 8 Nov 2026. Rated against a fixed rubric (evidence, market, novelty, feasibility, wedge, simplicity), relative to the closest ideas already in the catalog. A prior estimate to compare ideas before real-world signal arrives.
Act on this idea
Ideas only matter if someone runs with them. Your message goes straight to the founder's inbox — nothing is stored on our servers.
Business analysis
The framework reveals a high-value proposition that solves the 'RAG-gap' for complex, cross-file reasoning by leveraging recent breakthroughs in KV cache efficiency. While technically viable due to hybrid-attention models, the business faces significant risks regarding HBM memory costs and the potential for 'memory drift' in information-dense scenarios.
Strengths4
Weaknesses3
Opportunities3
Threats3
Essential for evaluating the internal technical advantage of resident KV caches against the external threat of rapidly evolving LLM architectures. · Generated 2026-11-08 by Gemma 4AI-generatedFull SWOT Analysis →
Who benefits
- Cognition AIcompany
Its Devin coding agents could hold an entire repository in context to plan and execute multi-file edits without retrieval misses.
- Sourcegraphcompany
Its code-intelligence platform could add a resident whole-repo mode where cross-file questions bypass chunked search entirely.
- Anysphere (Cursor)company
An IDE 'whole-repo' context mode with load-once pricing is a natural premium tier for its developer customer base.
- Harveycompany
A legal matter's core documents (transcripts, exhibits, filings) fit within ~1M tokens, enabling single-context review without RAG splits losing cross-references.
Research it builds on
- DeepSeek-V4: Towards Highly Efficient Million-Token Context IntelligenceAll ideas from this paper →
- Gemma 4 Technical ReportAll ideas from this paper →
- Kimi K3: Open Frontier IntelligenceAll ideas from this paper →
- DeepSeek-V3.2: Pushing the Frontier of Open Large Language ModelsDeepSeek-AI, Aixin Liu, Mei, Aoxue et al. · 2025 · 341 citationsAll ideas from this paper →
- DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache CompressionDeepSeek-AI, :, Anyi Xu et al. · 2026 · 119 citationsAll ideas from this paper →
- KV-Compress: Paged KV-Cache Compression with Variable Compression Rates per Attention HeadIsaac Rehg · 2024 · 20 citationsAll ideas from this paper →
- HeadInfer: Memory-Efficient LLM Inference by Head-wise OffloadingLuo, Cheng, Zefan Cai, Sun, Hanshi et al. · 2025 · 18 citationsAll ideas from this paper →
- EpiCache: Episodic KV Cache Management for Long-Term Conversation on Resource-Constrained EnvironmentsMinsoo Kim, Arnav Kundu, Kim, Han-Byul et al. · 2025 · 11 citationsAll ideas from this paper →
- KV Cache Optimization Strategies for Scalable and Efficient LLM InferenceAll ideas from this paper →
- Can an LLM Induce a Graph? Investigating Memory Drift and Context LengthAll ideas from this paper →
- Resource-Friendly Dynamic Enhancement Chain for Multi-Hop Question AnsweringAll ideas from this paper →
- Out of the Memory Barrier: A Highly Memory Efficient Training System for LLMs with Million-Token ContextsAll ideas from this paper →