Skip to content

v3.10.53 — The Python console: working memory that costs no tokens

Choose a tag to compare

@KevRojo KevRojo released this 28 Jul 19:25

🧠 A persistent Python REPL whose variables survive across calls — the model's working memory, kept OUTSIDE the context window.

Scan a huge structure ONCE into a variable; it stays alive in the kernel's heap. Filter it, count it, aggregate it across turns while the model prints only the small slice it needs. The data never re-enters the conversation, so you never pay tokens to re-read or re-transmit it.

Real run: 101,619 files scanned into a variable, then queried three ways across separate calls — the context only ever saw a number, an 8-line slice, and a one-line summary. Roughly 1.5–2M tokens that never touched the conversation.

  • Isolated subprocess kernel — an infinite loop or crash kills the kernel, never Dulus. Wall-clock timeout + auto-restart.
  • Hardened against the cost trap: output capped at the source by characters (not just lines) with a bounded repr, so one giant line or a million-element list can't flood the context and get re-billed every turn.
  • input() neutralised, tracebacks trimmed to your frames, trailing expressions echo like a REPL.

📖 Full write-up: The model's second brain

And the quiet part, out loud: we did this first. One builder in the DR and his agent, turning "imagine the model had a live console" into a shipped, hardened, cache-safe feature the same day. There's a date on it now. 🦅🇩🇴

pip install -U dulus · PyPI