We use cookies. Analytics only with your consent. Change your preferences anytime.

🇬🇧
Back to newsroom
Updates

Long AI Chats Without Forgetting: Context Compaction, Project Memory and Smarter Tools

AI chats in the IDE now compact automatically at 200K tokens, keep a searchable history and a Claude Code-style project memory, and cost far less.

By AI Codes It Team Oct 26, 2026 7 min read

Long conversations with an AI coding assistant used to have a hidden cost. Every message re-sent the entire chat to the model, file reads and search results included, so a long session got slower, more expensive and, eventually, forgetful. This update fixes that. Your chats in the AI Codes It IDE can now run for hours, keep track of what matters and cost a fraction of what they did.

It borrows the approach professional AI coding agents like Claude Code use for long sessions: keep tool output small from the first step, summarise only when the conversation is really full, keep the full history searchable, and give the AI a memory that survives every chat.

Conversation fragments flowing into a compact AI memory core

Why long AI chats get slow and expensive

An AI model has no memory between messages. To answer your tenth message it has to read the first nine again, plus every file it opened and every command it ran. That whole package is its context, measured in tokens, and you pay for every token on every request.

One reply is also rarely one request. When the AI searches your project, reads a file, edits it and checks the result, each of those steps is a separate request that carries the whole context again. In one real session we measured, a single search returned over 750,000 characters of matches from minified and backup files. That one result then rode along on every following step of the reply, and one small request ("make the scroller move more slowly") ended up costing far more than it should.

The fix comes in three layers: keep tool results small, compact the conversation when it gets full, and remember the important things outside the conversation.

The context ring: see how full your chat is

Next to the send button you will now find a small ring. It fills up as the conversation grows and is full when it reaches your compaction limit, which is 200K tokens by default for every model. It turns orange at 80% and red at 95%, and it spins while a compaction is running. Hover it to see the exact numbers, for example "64K / 200K tokens (32%)". After each reply it shows the real size of the last request the AI received, not a guess.

Click the ring to open the context panel:

  • Compact now, with an optional focus such as "keep the checkout details".
  • Compact at: choose your own limit, from 50K to 1M tokens.
  • Auto-compact: on by default, switch it off if you prefer to decide yourself.
  • History & memory tools: let the AI search the full chat and use the project memory.
  • Summary model: the model that writes the summary. By default it is the model you are chatting with, but you can pick any model from the list.
  • Project memory: see, edit, add or delete what the AI remembers about this project.

How automatic compaction works

When a chat reaches your limit, the older part of the conversation is replaced by a structured summary before the AI answers. The summary always uses the same headings, so nothing important slips through:

  • Goals of the project
  • Decisions with their exact values: colors, fonts, libraries, wording
  • Files changed and why
  • Errors and fixes, including approaches that failed, so they are not tried again
  • All your requests, in order, marked done or still open
  • Pending work and the current task

Around the summary, the AI keeps what it needs to continue smoothly. The latest messages stay word for word, and the files the chat edited most recently are attached again, read fresh from disk. A chat that was at 200K typically drops to around 25K to 50K tokens and keeps going. In the chat you see a divider such as "Context compressed: 198K → 31K · view summary", and you can click it to read exactly what the AI is now working from.

Old tool results are also trimmed along the way. Once enough old output piles up, earlier file reads and command results become one-line notes like "old output removed, run the tool again if you need it", while the latest results stay complete. They are trimmed in batches rather than on every message, which keeps prompt caching working.

Compact on demand with /compact

Finished one feature and starting the next? Type /compact in the prompt box to compact right away. Add a focus to tell the summary what to keep in full detail, for example /compact keep the Stripe webhook details. You can do the same from the Compact now button in the context panel.

Nothing is lost: the full chat stays searchable

Compaction only changes what the AI works from. Your chat history is never shortened: every message stays saved and visible, and the AI can still reach all of it through its conversation tool:

  • search finds earlier messages by their words and returns message numbers with a snippet.
  • read loads those messages back word for word.

So if you say "use the same error message style we did for the webhook bug earlier" and that detail did not make it into the summary, the AI looks it up instead of guessing.

Project memory, the Claude Code way

Some facts should outlive every chat: your brand colors, how prices are written, a folder that must never be touched. That is what project memory is for, and it now works like Claude Code's memory.

Each fact is a separate memory with a name, a type and a one-line description. On every message the AI sees only the short index:

- brand-colors [project] — primary #1E40AF, accent #F59E0B, font Inter
- prices-format [user] — prices shown as 12,50 € (sign after the number)
- never-touch-legacy [feedback] — don't edit /admin/legacy (client's old system)

When a task needs the details, for example when styling a button, the AI opens just that memory. When it learns something new, because you said "remember this", corrected it, or confirmed a lasting decision, it saves or updates that one memory instead of rewriting everything. Twenty memories cost about 500 tokens per message, so the memory can grow without making every message more expensive. Memories are shared by every chat in the project, and you can manage them yourself from the context panel.

Smarter tools: small results from the very first step

The biggest saving comes from keeping tool results small, which is exactly how Claude Code avoids filling its context:

  • Search lists files first. Searching your project now returns which files match and how many times. The AI asks for the matching lines only when it needs them, and those are capped too. In our own project, a search for "scroll" went from more than 750,000 characters to about 4,000.
  • It searches every text file: PHP, XML, SVG, .htaccess and more. It skips only what your project's .gitignore excludes.
  • Reads are capped at 2,000 lines per call, and very long minified lines are cut. The AI reads big files in parts.
  • Huge results are set aside. When a command, database query or web page returns more than 30,000 characters, the AI gets a preview and the full output is saved as a temporary file for the rest of that reply. It is deleted when the reply ends and is never committed or published.
  • Prompt caching is now on for Anthropic models, so the parts of a request that repeat from step to step cost a fraction of the normal price.

A faster IDE for long chats

The chat panel itself got faster too. The history list used to download every message of your last 100 chats when the page opened. In our own busiest project that was over 40 MB. Now it loads only titles and message counts, about 18 KB, and fetches a chat's messages when you open it. Very long chats now show their latest messages first, with a "Show earlier messages" button, so streaming replies stay smooth even in conversations with more than a thousand messages.

What it costs

Summaries are written by the model you are chatting with, or the one you choose in the context panel, and they are billed like a normal reply. If you are out of credits, a free model writes the summary instead, so your chat never gets stuck. In practice compaction saves far more than it costs: after compacting, every following message carries tens of thousands of tokens instead of hundreds of thousands.

Try it now

There is nothing to set up. Open any project in the IDE and keep building: the ring fills as you go, compaction happens on its own at 200K, and the AI remembers what matters. If you want more control, click the ring to change the limit, pick a summary model or edit the project memory.

New here? Start a project for free and see how far a single conversation can take your website.


Keep reading: AI Cost Transparency and Budget Limits · AI Codes It vs Claude Code: Token Costs · How the Pipeline Editor Works

Filed under //
Updates AICODESIT
Share //
From reading to building

Ready to build yours?

Everything you just read about, you can try in the browser — describe your idea and watch the AI write, host and deploy it in about a minute.