Skip to Content

The gray block, the white card and the red-and-green lines

Your first conversations had extra furniture around the answer. A collapsed gray block. A white card with a tool name on it. Lines in red and green that look like a correction. None of it is decoration. It is the record
September 12, 2026 by
The gray block, the white card and the red-and-green lines
OdooBot
watch it work
Pi Agent Guide · Part 5

The gray block, the white card and the red-and-green lines

Your first conversations had extra furniture around the answer. A collapsed gray block. A white card with a tool name on it. Lines in red and green that look like a correction. None of it is decoration. It is the record of what the agent thought, what it did, and what it wants to change in your files. This article teaches you to read all three, and to know which you can skip.

3 blocks
Reasoning, tool card, inline diff
7 tools
The built-ins that can produce a card
$0.02
A real two-tool task, metered as it ran
Why bother reading them

The answer is the claim. The blocks are the evidence.

An ordinary chat page gives you prose and nothing else. Pi Agent gives you prose plus a record, because it does not only talk — it reads your files and changes them.

In plain terms

A plumber tells you he checked the boiler. That is the answer. The photo of the pressure gauge, and the parts receipt, are the blocks. You do not study them every visit. You study them the week the heating stops.

All three have proper names, worth learning because the software uses these words when something goes wrong.

BlockWhat it recordsHow you spot it
Reasoning blockReasoning information the provider chose to exposeGray, collapsed, with a small disclosure control
Tool call cardSomething an external tool attempted or didA white card labeled with the tool name
Inline diffWhich lines of a file an edit removes and addsRed and green lines, interleaved

Each row deserves a closer look than the one above it.

One turn can carry all three. A real session can place the gray block above the final answer, show a tool call as a white card, and render a file change in red and green — and each can be expanded for the detail underneath. Which of them you actually get depends on the model you chose and on what the request needed. A question answered from memory may produce none of them.

These records help you review. They do not make anything safe. Depending on the guardrails active in your session, a tool can run before you have read its card. Visibility is not permission.
The gray block

Easy to miss, and easy to over-trust

The reasoning block is gray, usually labeled Thinking or its translated equivalent, and normally arrives collapsed. Open it and you get whatever reasoning text the model's route makes available — a long passage, a short summary, or only usage metadata.

In plain terms

This is not a window into the model's mind. It is more like the working a student writes in the margin — sometimes the full steps, sometimes a tidy summary written afterward, sometimes just a note that working happened. Useful, not sworn testimony.

Only a supported reasoning model on a supported route produces one at all. Open it when the answer is strange, when it conflicts with something you told it, or when you want to see how the request was split up — for a lighting request, into trigger, condition and action. Skip it for a lookup, for anything low risk that you can check yourself, and for results you are not going to use.

You picked a reasoning model and got no block

Three things to check, in this order:

  • The reasoning option is off. Where a model entry exposes a reasoning checkbox, that is what decides whether the block is rendered separately. Part 3 covers the model entry.
  • The provider's thinkingFormat is wrong. It is a provider-level field: zai for GLM, deepseek for DeepSeek, qwen for a compatible Qwen route, openai only for an applicable direct OpenAI-compatible route. A direct Anthropic route normally leaves it blank, because the SDK uses its own thinking content block. The wrong parser simply fails to separate the reasoning out.
  • The model is not a reasoning model. Family names lie. A catalog can list reasoning and non-reasoning variants side by side, and a Kimi K2-Instruct listing is an Instruct route, not a Thinking one. Confirm the exact model ID.
Valid thinkingFormat values are openai, openrouter, together, deepseek, zai, qwen, chat-template, qwen-chat-template, string-thinking and ant-ling. There is no native and no none — if a guide tells you to type either, it is describing different software.
The white card

The block that records something real

A tool card appears when the agent needs to act rather than write. It carries the tool name, the input it sent and the result it got back, and reads Running…, success or failure as it goes.

The core package, @earendil-works/pi-coding-agent, ships seven tools, all lowercase:

ToolWhat it doesExpand the card?
readRead a fileRecommended — confirm the file and how much of it
writeCreate or replace a whole fileAlways — path and content both
editReplace a matched section, producing a diffAlways — read the complete diff
bashRun a shell commandRecommended, and never skip it for rm, mv or sudo
grepSearch inside filesUsually optional, unless results look wrong
findFind paths by patternUsually optional — glance at the search root
lsList a directoryUsually optional, though paths can be sensitive

Names like read_file, web_fetch or search belong to other agent systems. There is no built-in web fetch here; reaching the web needs a Skill built around something like curl or playwright, or a plain bash: curl … command.

Pi Web in the middle of a task. The request at the top asks for a file called notes.md with three bullet points, then to read it back. Two tool cards follow: write notes.md marked 5s, with a cost line reading 1,180 in, 70 out, $0.0080; and read notes.md marked 2s, with 1,265 in, 18 out, $0.0069. Below them the session reads Waiting for model. The message box has become Steer now / queue follow-up with Steer and Follow-up buttons, and a red Stop button sits at the bottom right. The top bar shows $0.02.
While it runsEach card is timed and priced as it happens, and the session total sits in the top bar.Live workspace
  • Each card names its tool and its filewrite notes.md at 5s, read notes.md at 2s — with its own cost line underneath, so a slow or expensive step is obvious without doing arithmetic.
  • $0.02 in the top bar is the running session total. That is this whole exchange, not a month of use.
  • Waiting for model… is the gap between the last tool result and the written answer. Nothing is stuck.
  • The message box becomes Steer now / queue follow-up with Steer and Follow-up buttons, and the red Stop at the bottom right is your handbrake for the moment you read a bash command you did not expect.

When the run finishes, the turn collapses into a summary you can reopen.

The same task once it has finished. A single collapsed row reads Process details, 2 messages, 2 tool calls. Under it the answer begins Created notes.md with, followed by three bullet points. Below that sit a notes.md file chip and a cost line reading 187 in, 57 out, 1,152 cache R, $0.0032. In the EXPLORER panel on the left, notes.md now appears.
After it finishesTwo messages, two tool calls, one new file — and the explorer on the left shows it.Live workspace
  • Process details · 2 messages · 2 tool calls is the collapsed record of the run. Open that row to get the cards back.
  • notes.md in the EXPLORER on the left is the proof the file exists now. The chip sitting beside the answer names it too.
  • The cost line ends with 1,152 cache R — input served from cache, which is part of why a follow-up in the same session often costs less than the first message did.
A failed tool can still be followed by confident prose. If a card is red, expand it, read the isError output, and check whether a partial change landed before you let it try again.
The red and green lines

Your last human checkpoint

Deleted lines are red with a -. Added lines are green with a +. The white lines between them are unchanged context, exactly like a diff on a code hosting site.

In plain terms

Think of tracked changes coming back from an editor. Struck-through text is leaving, underlined text is arriving, and the rest is there so you can see where it happens. You read all of it before you accept, not just the first two lines.

A diff appears when the agent proposes or performs an edit to a file it has a baseline for. A standalone code sample has no baseline, so it produces no diff — which is itself a signal that nothing has been compared against your actual file.

Read the whole patch, not just what fits on screen. Controls such as Show details, Apply, Copy and Compare HEAD depend on your pi-web version and the active guardrails, so yours may differ.

Three ways to handle one

Copy a version you reviewed, by hand

The most conservative route. Compare against the original, keep the YAML indentation intact, and apply only the part you actually read and understood.

Let it use edit or write

Prefer edit for an exact local change over write replacing a whole file. Either way you still watch the card: path, full content, and whether it already ran.

Reject it and say why

Name the line that must stay and the behavior that must change. You get a new diff — which you review from the beginning again, not from where you left off.

Before you touch configuration.yaml, automations.yaml, scripts.yaml or .storage/: back up, and confirm you know how to restore. No snapshot replaces validating the syntax and testing the change safely.
One request, block by block

What a real turn looks like end to end

Say you ask for a 10:00 p.m. living-room lighting automation. The session has file tools and the home-assistant-best-practices Skill, which adds guidance rather than any new tool — it nudges the agent toward edit rather than rewriting all of automations.yaml. The turn may come back in five parts.

flowchart TD
  A["1 · Reasoning block
a 22:00 trigger, light.turn_off,
target light.living_room"] --> B["2 · Tool card: read
path: /config/automations.yaml"] B --> C["3 · Tool card: edit
plus an inline diff of the new entry"] C --> D["4 · Result inside the same card
success, or old_string did not match"] D --> E["5 · Final answer
a summary, plus reload guidance"] E --> F["6 · You validate the config
and test the automation safely"]
The shape of one editSteps 1 to 5 are the agent. Step 6 is you, and nothing in the first five removes the need for it.
BlockWhat it holdsYour job
1 · ReasoningThe stated approach — trigger, action, target, whether a condition is neededOptional. Read the approach, do not treat it as evidence
2 · read cardInput path: /config/automations.yaml; output, the existing fileConfirm the path, and that enough of the file was read
3 · edit card and diffThe old_string and new_string, rendered as the added automation with its alias, triggers and actionsAlways. Check light.living_room, the indentation, that nothing else moved
4 · ResultSuccess, or a failure inside the same edit cardAn error usually means old_string did not match. Success does not mean valid YAML
5 · Final answerA summary that a rule was added, plus validation and reload guidanceValidate the configuration and test the automation safely
Why edit is the safer verb. It requires an exact match on the old text. That limits accidental broad replacement, and it can reject context the model invented. It still does not prove the replacement is correct.

If all you read is “Done”, you never saw the path, the entity ID, the exact YAML, or whether the tool actually succeeded. The blocks are where those four things live.

What they cost you

Every block is also tokens

All three can add to your usage, though how a route bills them varies. A reasoning block may add hundreds or thousands of tokens. A large read pushes a lot of file into your context, and that context comes back around on the next turn.

In plain terms

Collapsing a reasoning block is like folding away the taxi's meter display. The fare is unaffected. If you want to spend less you take a shorter trip or a different cab — you do not hide the number.

Three controls that do change the number:

  • Use reasoning only when the task needs it. For a lookup or a low-risk question, pick a current lower-cost non-reasoning model from your catalog.
  • Decide how much file it needs before you ask. If one range matters, ask for that range instead of loading thousands of irrelevant lines into context.
  • Start a new session when one gets long. Old reasoning blocks and tool output ride along into later turns. Watch the contextUsage indicator if your version shows percent used against the context window.
There is no universal warning threshold. Do not treat 60 percent as a guaranteed cutoff, and do not wait for the provider to reject a request. Follow the documented limit of the exact route you are on.

As for hiding them: the documented 0.8.4 baseline has no guaranteed global switch that suppresses every reasoning block. What it has is a display preference for whether they start open.

The Settings dialog in Pi Web, open on the General tab, with Models, Skills, Sub-agents and Plugins tabs beside it. Appearance offers Light, Dark and System, with System selected. Under Chat, a toggle labeled Expand thinking blocks by default is switched off, followed by Chat content width at 820px, Chat font size at 14px, and a Show actions for selected text toggle.
Settings → GeneralA display preference, not a billing one.
  • Expand thinking blocks by default is the toggle people go looking for. It is off here, so reasoning blocks arrive collapsed. It does not decide whether reasoning happens.
  • Appearance — Light, Dark or System, set to System, which follows the theme your browser is already using.
  • The rest of the tab is Chat content width at 820px and Chat font size at 14px. Reading comfort, nothing to do with what a turn costs.

To genuinely stop paying for reasoning, change the model entry's reasoning setting where the route supports it, or select a non-reasoning model ID. A tidier screen is not a smaller bill.

When a block misbehaves

Six things that go wrong

A reasoning block will not expand
Wait for generation to finish first. If it still will not open, reload the page, then try a private window with no extensions. Press F12 and check the browser console for a real JavaScript error before assuming the block is empty.
A tool card reports an error
Expand it and read the isError output. Usual causes: a wrong path such as /config/automations.yaml when your file is elsewhere, a bash command exiting nonzero, or an edit whose old_string did not match. Work out whether anything partially happened before you ask for a retry.
A copied diff breaks the YAML indentation
Compare the whitespace against the original — tabs and spaces look identical on screen and are not. Ask for a complete reviewed file only when replacing the whole file is genuinely the right move, not as a way to avoid reading the diff.
A tool sits on “Running…”
Look at which tool. A wide find /, a long ffmpeg run or a very large read genuinely takes time; a Skill-provided network tool is the other slow candidate. Use Cancel if your version offers it, then check the resulting isError state.
No diff appears — only code
A diff needs a baseline. If you never gave it the actual automations.yaml, there is nothing to compare against. Ask it to read the real file first, then edit.
The code in the diff looks fine, and you are not sure
Check entity IDs character by character (light.living_room, not light.liveing_room). Reject an unintended path such as /. Confirm current Home Assistant syntax for your context, including whether it expects service: or action:. If you cannot read the indentation, ask for a plain-English, line-by-line explanation before you apply anything.
Next

Where to go from here

keep going

You can read a turn. Now choose what produces it.

Part 6 asks a question you have probably already had: one provider, or more than one? It is mostly an argument for staying where you are — but it tells you when that stops being true.

Open the full guide

Part 5 of the Pi Agent Onboarding Guide series, published by WoowTech.

Based on the Woow HA Pi Agent Onboarding Guide, produced by WoowTech and released under CC BY 4.0.

The Smart Space Solution · 智慧空間解決方案 · © 2026 WOOW Technology Co., Ltd.

Share this post