Elyra · · 5 min read

Elyra Desktop 0.4: what the model actually gets

Elyra Desktop 0.4 adds a context inspector: see the context window broken down block by block, and exclude the boulders without deleting them.

Elyra Desktop 0.4: what the model actually gets

There's a number in the footer of every Elyra session: tokens in, tokens out, cost to three decimals. It's honest, and it's useless for one particular question — the question you ask when a session has gone on for two hours, the answers are getting vaguer, and the cost per turn has quietly tripled. What is actually in there?

You know roughly. The system prompt. Your AGENTS.md. The conversation so far. Some tool results. But how much of each? Is it the forty-file read from an hour ago that's eating a third of the window? Is it the test output you asked for once and never needed again? Is the system prompt bigger than you think, because three skills loaded and each brought its documentation?

You can't answer that from a number. You can from a picture. That's 0.4.

The inspector

/context, or cmd+i. The context window as a stacked bar at the top and a block list below it:

▕████████▏▕████▏▕██▏▕██████████████████████████▏▕███▏       118,400 / 200,000 est.
 system    tools  pins  conversation                     provider reported 116,912

SYSTEM PROMPT 9,120 base instructions 2,310 AGENTS.md ~/code/elyra-web 3,870 AGENTS.md ~/code/elyra-web/.ai/rules/testing.md 940 memory (7 entries) 610 decisions (3) 280 skill: tall-stack 1,110

TOOL DEFINITIONS (5) 4,380

PINNED FILES (2) 2,760 app/Support/Meta.php 1,900 config/markdown.php 860

CONVERSATION (38 entries) 102,140 14:02 you "The docs layout ignores the description prop…" 180 14:02 assistant read ×4, bash ×1 420 14:02 tool read resources/views/components/layouts/docs.blade.php 6,200 14:03 tool bash php artisan route:list 31,400 ◀ 14:03 assistant "Found it — description isn't declared in @props…" 640 …

Two numbers in the header, and that's deliberate. The estimate is ours — a tokenizer approximation, block by block, which is the only way to attribute a total to its parts. The provider reported figure is what the last API call actually cost, straight from the response. They're shown side by side so you can see how far the estimate is from the truth. In practice it's a percent or two; when it isn't, that's a fact worth knowing about your model and your content, and we'd rather show you than hide the gap behind one confident number.

And now you can see it: route:list on a Laravel app with four hundred routes. Thirty-one thousand tokens. It answered its question in the first twelve lines an hour ago, and it has been in every model call since.

Exclude, don't delete

Click that block, and it goes grey. It's excluded: it won't be sent on the next model call, or any call after it, until you bring it back. It is still in the session — you can read it, search it in the archive, and re-include it with another click.

Three decisions make that safe, and each one exists because the obvious approach breaks something.

1. The exclusion is a session entry

The obvious approach is a flag in memory: excluded = true. Then you reload the window, or continue the session from the terminal, and the flag is gone and the thirty-one thousand tokens are back.

So an exclusion is written into the session as its own custom entry — at 14:41 the user excluded entry 17. It's part of the history. It survives reload, it survives switching editions, and it's visible in the tree like any other event. Un-excluding writes another entry. The session file stays append-only, which is the property everything else in Elyra depends on.

2. An excluded tool result becomes a stub

Here's the one that bites. A model call has structure: the assistant said I'll run route:list, and the next message is the result. Every provider validates that pairing — a tool call without a result is a malformed conversation, and Anthropic, OpenAI and Google will all refuse it.

So you can't just remove the result. Instead, the excluded block is replaced, in the outgoing request only, by a short stub:

[tool result excluded by user — 31,400 tokens, php artisan route:list]

The call is still answered. The provider is happy. The model knows something was there and roughly what, which is honest — and it costs about thirty tokens instead of thirty-one thousand.

3. The transcript says so

The thing you're reading and the thing the model is reading must never silently diverge. If they do, you'll ask a follow-up about something the model can no longer see, get a confused answer, and not know why. So excluded entries are marked in the transcript — greyed, with a small excluded tag — right where they sit. What you see is what it gets, and where it isn't, you can see that too.

What it's for

Two things, mostly.

Cost, when a session gets long. The example above is real in shape if not in detail: one oversized tool result, dragged through forty subsequent calls. Excluding it took one click and knocked a quarter off the per-turn cost for the rest of the afternoon. /compact would also have handled it — but compaction summarises everything older than a point, and sometimes you want the conversation intact and just one boulder removed.

Quality, when the model is confused. Context isn't only expensive; it's distracting. A stale file from before a refactor, a wrong answer from turn 6 that you corrected in turn 7 but that's still sitting there — the model weighs all of it. Excluding the stale version is a way of saying forget that, it's not true any more, without rewriting history or starting over.

The inspector is the manual counterpart to /compact. Compaction decides for you, with a summary. The inspector lets you decide, block by block, and shows you the cost of each choice before you make it.

The system prompt, itemised

One more thing the picture gives you that the number never did: the system prompt broken out by source. Base instructions. Each AGENTS.md file, by path, so you can see that the one in .ai/rules/ is loading too. Memory entries. Decisions from the log. Skills, individually.

This is the part people are most surprised by. A well-organised project with three AGENTS.md files, a couple of skills and a healthy memory can be spending nine or ten thousand tokens before you've typed a word. That's usually fine — it's why the agent knows your conventions — but it's worth knowing, and it's worth seeing which skill is the heavy one when you're deciding whether to keep it on for this session.

Get it

Elyra Desktop 0.4 is at elyracode.com/elyra — the Desktop tab. macOS on Apple silicon; Linux on x86_64 and ARM64; free to use, every feature. Already installed? /update. The desktop guide has the inspector under What the model actually gets.

Open a long session. Press cmd+i. Find the boulder.