πŸ›  We are currently running final tests on the desktop application and completing setup adjustments to ensure a smooth experience from day one. Full access and official installers for Windows, macOS, and Linux will be available again shortly.

Token control & savings

Sliding window, atomic memory and Handover: why you do not need /clear to avoid wasting tokens.

A generic chat resends the whole conversation with every message: the cost grows with each turn and, once it reaches the model's limit, it "forgets" the beginning. DevFlow AI uses an atomic context window that keeps the cost per request bounded even when the conversation never ends.

Atomic memory

Each request is built from three blocks:

  1. Base System Prompt: the rules and architecture from .app_context/DEVFLOW.md.
  2. Handover state: the contents of handover_state.json, with decisions, done and pending tasks and the atomic summary of old turns.
  3. Recent history: only the last 3 turns in full. In Agent Mode, the intermediate steps of a long task are condensed.

All of it respects an input token cap you choose in the chat bar ("Context" selector). The System Prompt may take at most 45% of the cap; the rest is for the history.

Request = rules (DEVFLOW.md) + Handover state + last 3 turns  ≀  chosen cap

The sliding window

Think of the conversation as a moving tape: the model only "sees" the part that fits in the window (the last 3 turns) plus the compressed state. When you send a new message, the window slides:

Turn 1 ─┐
Turn 2  β”œβ”€β–Ί condensed into handover_state.json (atomic summary)
Turn 3 β”€β”˜
Turn 4 ─┐
Turn 5  β”œβ”€β–Ί window: sent in full
Turn 6 β”€β”˜

The cost per request stops growing with the length of the conversation: message 100 costs roughly the same as message 5.

Do I need to use /clear?

No. Other tools recommend clearing the chat with /clear or opening new conversations often to avoid wasting tokens, at the cost of losing context. In DevFlow AI you do not need to:

  • Old turns are no longer resent in full: they are condensed automatically.
  • What matters (decisions, pending tasks, files touched) survives in the Handover state and in DEVFLOW.md, so you lose nothing by staying in the same chat.
  • When the session builds up many tokens, the πŸ”„ Handover button lights up: click it and you continue in a clean chat with the context, instead of starting from scratch.

You only need a new chat when you switch to a completely different topic and do not want the previous state to influence it.

Automatic micro-handover

When a turn leaves the window it is not lost: the local engine condenses it into the handover state before the next call. The full messages stay in the interface and in the local SQLite database, but the model only receives their summary.

The continuity button (πŸ”„ Handover)

The "Session" counter in the chat bar adds up the tokens consumed. When the session gets close to the threshold (500,000 tokens), the πŸ”„ Handover button turns red. When you click it:

  1. A summary of the session is generated: decisions, completed tasks, pending tasks and files touched.
  2. It is saved to handover_state.json and DEVFLOW.md.
  3. A new chat opens starting from that state: you keep working where you left off without dragging the cost of the history along.

The "Saved" indicator shows the tokens you saved thanks to the Handover.

Choosing the context cap

CapWhen to use it
16K – 32KDaily use: focused tasks, maximum savings (32K is the default).
64K – 128KLarge files or several parts of the project at once.
256K – 1MOne-off analysis of a lot of code. Only with models that support that window.

A bigger cap does not resend more old turns (it is always the last 3 plus the summary): it only leaves room for longer files and messages. Every input token is billed, so raise it only when you need it. Options above the selected model's window are shown disabled.

Last updated: November 26, 2026