Skip to content

Context and cost

The context window holds what the model can use for its next answer. It fills with instructions, tool descriptions, your messages and images, the model’s replies and tool results.

Terminal window
/context

This breaks down the space used by the system prompt, tools, messages and any compaction summary. The breakdown is an estimate; the last response’s reported size comes from the provider.

Automatic compaction is on by default. As the conversation approaches the model’s window, Tatu summarizes older history and keeps recent messages. It can also compact and retry after the provider rejects a request as too large.

To compact sooner, use /compact. Add a focus for the summary when some details matter more:

Terminal window
/compact Keep the parser decisions, changed files and remaining test failures.

Compaction changes what the model sees, not the saved history. A summary is not a verbatim copy, so ask the model to reread files when exact details matter. Summarizing uses a model call and counts toward cost.

Use a temporary side conversation to ask about the work without adding to the main conversation:

Terminal window
/btw Why did we choose this parser?

Each question uses the session’s current model and effort, captured again when you ask. It receives the effective completed main context (including any compaction summary), retained side exchanges and your new question. Existing images contribute their already available text descriptions only. Live responses, unfinished tools and queued messages are excluded. It runs no tools, new hooks or new image descriptions, and accepts no image attachments. It cannot read a new file or change your project.

The answer streams in its own panel while the main agent can keep working. Follow-ups go in the panel’s separate field. Empty /btw opens or reopens the panel without calling the model. Neither the questions nor answers enter the main history, queue or context window. To make a side answer part of the main conversation, copy it and send it yourself.

The side history is shared by every interface attached to this session on the computer running it. Opening the panel, drafts and reading position are local to each interface: another client’s question updates the history but does not open your panel. Only one side answer can run at once; another question fails busy, without queueing or replacing it. Errors, retries and length warnings appear with the answer.

In the terminal, use Tab to switch between the follow-up field and reading, and c to copy a visible answer only while reading. Esc closes without stopping; Ctrl+C stops the active side answer, or closes an idle panel. The main draft stays untouched. See Keys for panel-only controls.

Closing a panel or losing the connection does not stop the host’s answer. Reconnect restores its current side history without resending your question. Shutting down that session’s host or replacing the conversation with new, resume, fork or branch discards the exchanges. Resuming restores saved usage, not side text.

The history keeps at most 20 recent exchanges within a conservative 256 KiB budget, including metadata and safety headroom; it can discard older exchanges sooner. A question is limited to 16 KiB of UTF-8 text. Answers are capped at 4096 output tokens, or the lower model/configured limit, and 64 KiB of received text and reasoning; the history budget can stop them sooner. Truncated answers show a warning. An oversized context fails only the side answer, without compacting the main conversation.

/cost shows the session total, split by model, subagents, compaction summaries, side conversations (btw, also broken down by model) and other calls such as session names and image descriptions. A price shown as n/a means Tatu does not know the model’s price, not that the call is free.

Side answers do not grow the main token window, but each question makes an additional paid provider call with the context again. There is no token-saving guarantee. Provider-reported side usage, including usage reported on failure or stop, counts toward the session total even after older exchanges are removed.

Only call identities, model information and usage metrics are saved for side conversations, never questions, answers, reasoning or error text. Saved metrics survive resume and count across all branches; going back does not undo spending. A fork copies only metrics on the history path it copies, not spending on other branches. A new session file is created only with its first main message: if you use only /btw and quit before that message, its pending metrics are lost even though the provider still charges.

/usage asks signed-in providers for subscription limits or account balances where supported. For a LiteLLM proxy it shows how much of the key’s budget is spent and when it resets, and shows nothing for a key with no budget. It is different from session spending: an account can include work done outside this session. A provider can fail to report usage without stopping your conversation.

The footer keeps the current model and effort, context use, session cost and response speed nearby. It also shows the current provider’s limits or balance when available. On narrow terminals, some details give way to what fits.

If the model call of the main conversation fails because your subscription or API quota is used up, Tatu pauses the task instead of failing it. Nothing is generating while it waits. The work already done, the partial answer and your queued messages stay as they are, and a panel replaces the editor (your draft is kept). The phone app shows the same choices next to its composer.

When the provider says when the limit resets, the panel shows that time in your local time zone and the wait. Tatu takes it from the provider’s error when it is trustworthy, and otherwise from one fresh /usage lookup. If neither knows, the panel says so and does not promise anything. A billing problem, such as no credit left, never has a reset.

Choose with ↑/↓ and Enter, or press a row’s number. Esc does nothing: the task stays paused.

  • Resume at reset, offered only with a known reset, lets Tatu make one attempt two seconds after it. It covers this pause only: a new limit pauses again and asks again. Once authorized, the row becomes Cancel scheduled resume, which removes it and keeps the task paused.
  • Try again now makes one attempt. If the limit still holds, the task pauses again.
  • Switch provider opens the model picker with only the available models of other providers. It is absent when you have none.
  • End task stops the task and keeps the conversation.

The scheduled attempt runs on the computer where the session runs, so that Tatu process (or the daemon behind your phone) has to stay open; closing it cancels the schedule but keeps the pause. In -p and -json runs there is no one to ask, so the run ends with an error as before. Side questions and subagents do not pause the task.