Live data from Hacker News

Ask HN: What is the best way to provide continuous context to models?

news.ycombinator.com

21–30 of 48 posts

Re: Ask HN: What is the best way to provide continuous context to models?

#21

I open 4 chat windows with Gemini 3.0 Pro. I paste in all file contents to each window. I ask them "which files would an AI need to do $TASK effectively?" Each of the 4 responses will disagree, despite some overlap. I take the union of the 4 responses as the canonical set of files that an implementer would need to see. This reduces the risk of missing key files, while increasing the risk of including marginally impor…

That sounds cumbersome and even more wasteful than my own method of simply dumping a fixed selection of project code in Gemini for each set of requests. Is there any benefit to pruning?

> Is there any benefit to pruning?

1- Better quality output due to pruning noise, while reducing the chances of missing key context.

2- Saving time/effort by not using my brain to decide which files to include.

3- ChatGPT 5.2 Pro only allows 60k tokens, so I have no choice sometimes.

It comes with costs as you identified. It's a trade-off that I am willing to pay.

Re: Ask HN: What is the best way to provide continuous context to models?

#22
post #3
post #2

There is no such thing as continuous context. There is only context that you start and stop, which is the same as typing those words in the prompt. To make anything carry over to a second thread, it must be included in the second thread's context. Rules are just context, too, and all elaborate AI control systems boil down to these contexts and tool calls. In other words, you can rig it up anyway you like. Only the co…

Furthermore, all of the major LLM APIs reward you for re-sending the same context with only appended data in the form of lower token costs (caching). There may be a day when we retroactively edit context, but the system in it's current state is not very supportive of that.

> Furthermore, all of the major LLM APIs reward you for re-sending the same context with only appended data in the form of lower token costs (caching).

There's a little more flexibility than that. You can strip of some trailing context before appending some new context. This allows you to keep the 'long-term context' minimal, while still making good use of the cache.

Re: Ask HN: What is the best way to provide continuous context to models?

#23

I've been building https://www.usesatori.sh/ to give persistent context to agents Would be happy to onboard you personally.

I'm not OP, but send me an email. My address is in my HN profile. You and I are building the same thing, and I would love to have a chat.

Re: Ask HN: What is the best way to provide continuous context to models?

#24
Tool calling + recursion seems to be the answer. Two tools are for manipulating the logical call stack - call/return. The trick is to not permit use of any meaningful tools at the root of recursion, but to always make their descriptions available. For instance, the root can't QueryWidgets or ExecuteShell, but any descendant of it can.

These constraints result in token-hungry activity being confined to child scopes that are fully isolated from their parents. The only way to communicate between stack frames is by way of the arguments to call() and return(). Theoretically, recursive dispatch gives us exponential scaling of effective context size as we descend into the call graph. It also helps to isolate bad trips and potentially learn from them.

Re: Ask HN: What is the best way to provide continuous context to models?

#25
Check out "cursor-mirror", this extended Anthropic Skill I've developed as a part of MOOLLM, which will tell you all about how cursor assembles its context:

cursor-mirror skill: https://github.com/SimHacker/moollm/tree/main/skills/cursor-...

cursor-mirror

See yourself think. Introspection tools for Cursor IDE — 47 read-only commands to inspect conversations, tool calls, context assembly, and agent reasoning from Cursor's internal SQLite databases.

By Don Hopkins, Leela AI — Part of MOOLLM

The Problem

LLM agents are black boxes. You prompt, they respond, you have no idea what happened inside. Context assembly? Opaque. Tool selection? Hidden. Reasoning? Buried in thinking blocks you can't access.

Cursor stores everything in SQLite. This tool opens those databases.

The Science

"You can't think about thinking without thinking about thinking about something." — Seymour Papert, Mindstorms: Children, Computers, and Powerful Ideas (Basic Books, 1980), p. 137

Papert's insight: metacognition requires concrete artifacts. Abstract introspection is empty. You need something to inspect.

This connects to three traditions:

Constructionism (Papert, 1980) — Learning happens through building inspectable artifacts. The Logo turtle wasn't about drawing; it was about making geometry visible so children could debug their mental models. cursor-mirror makes agent behavior visible so you can debug your mental model of how Cursor works.

Society of Mind (Minsky, 1986) — Intelligence emerges from interacting agents. Minsky's "K-lines" are activation patterns that recall mental states. cursor-mirror lets you see these patterns: which tools activated, what context was assembled, how the agent reasoned.

Schema Mechanism (Drescher, 1991) — Made-Up Minds describes how agents learn causal models through Context → Action → Result schemas. cursor-mirror provides the data for schema refinement: what context was assembled, what action was taken, what result occurred.

What You Can Inspect:

Conversation Structure

Context Assembly

Tool Execution

Server Configuration

MCP Servers

Image Archaeology

Python Sister Script CLI Tool: cursor_mirror.py

cursor_mirror.py: https://github.com/SimHacker/moollm/blob/main/skills/cursor-...

Here is the design and exploration and hacking session in which I iteratively designed and developed it, using MOOLLM's Constructionist "PLAY-LEARN-LIFT" methodology:

cursor-chat-reflection.md: https://github.com/SimHacker/moollm/blob/main/examples/adven...

Look at the "Scene 19 — Context Assembly Deep Dive" section and messageRequestContext schema, and "Scene 23 — Orchestration Deep Dive" section!

PR-CURSOR-MIRROR-GENESIS.md: https://github.com/SimHacker/moollm/blob/main/designs/PR-CUR...

play-learn-lift skill: https://github.com/SimHacker/moollm/tree/main/skills/play-le...

MOOLLM Anthropic compatible extended meta skill skill: https://github.com/SimHacker/moollm/tree/main/skills/skill

Specifically you can check out ORCHESTRATION.yml and other "YAML Jazz" metadata in the directory:

ORCHESTRATION.yml: https://github.com/SimHacker/moollm/blob/main/skills/cursor-...

Currently only supports Cursor running on Mac, but I'd be happy to accept PRs for Linux and Windows support. Look at the cursor-chat-relection.md document to see how I had Cursor analyze its own directories, files, and sqlite databases and JSON schemas. Also looking for help developing mirrors and MOOLMM kernel drivers for other orchestrators like Claud Code, etc.

DATA-SCHEMAS.yml: https://github.com/SimHacker/moollm/blob/main/skills/cursor-...

Re: Ask HN: What is the best way to provide continuous context to models?

#27

I think the emerging best way is to do "agentic search" over files. If you think about it, Claude Code is quite good at navigating large codebases and finding the required context for a problem. Further, instead of polluting the context of your main agent, you can run a subagent to do search and retrieve the important bits of information and report back to your main agent. This is what Claude Code does if you use the…

You can also create per-project agents with specific "expertise" in different parts of the code.

Basically they're just few kilobytes of text that's given as extra context to "explore" agents when looking at specific parts of the code.

Re: Ask HN: What is the best way to provide continuous context to models?

#28
post #7

I think the emerging best way is to do "agentic search" over files. If you think about it, Claude Code is quite good at navigating large codebases and finding the required context for a problem. Further, instead of polluting the context of your main agent, you can run a subagent to do search and retrieve the important bits of information and report back to your main agent. This is what Claude Code does if you use the…

Gemini 3 Flash is very good at the search task (it benchmarks quite close to 3 Pro in coding tasks but is much faster). I believe Amp switch to Gemini Flash for their search agent because it is better.

Gemini the model is good, Gemini the framework around the model is a steaming pile of crap.

Re: Ask HN: What is the best way to provide continuous context to models?

#29
post #7

Earlier quoted context omitted.

Gemini 3 Flash is very good at the search task (it benchmarks quite close to 3 Pro in coding tasks but is much faster). I believe Amp switch to Gemini Flash for their search agent because it is better.

Gemini the model is good, Gemini the framework around the model is a steaming pile of crap.

Yup. Gemini CLI needs a lot of work.

Re: Ask HN: What is the best way to provide continuous context to models?

#30
post #7

I think the emerging best way is to do "agentic search" over files. If you think about it, Claude Code is quite good at navigating large codebases and finding the required context for a problem. Further, instead of polluting the context of your main agent, you can run a subagent to do search and retrieve the important bits of information and report back to your main agent. This is what Claude Code does if you use the…

Gemini 3 Flash is very good at the search task (it benchmarks quite close to 3 Pro in coding tasks but is much faster). I believe Amp switch to Gemini Flash for their search agent because it is better.

I very much doubt this. I've been using gemini whenever I get hit by codex limits over the past week. 3 pro is very good - a bit behind codex but still very useful. I've tried 3 flash several times and each time what I got back was complete garbage. After the third or fourth attempt I stopped trying.
Post reply on HN