Skip to content

Sessions

A session is one agent’s conversation. In the interactive interfaces, sessions live in the tabs of a workspace; this page is about the transcripts behind them. Every agent, including every subagent, writes an append-only transcript to ~/.malac/sessions/<id>.jsonl. It records the session’s metadata (label, parent, model, working directory), every message, token usage and compaction summaries. The files are plain JSON lines: readable, greppable and deletable.

malac -c # continue the most recent session in this directory
malac -r 019a1f3c-… # resume a session by id

In the interactive interfaces, the session opens in the workspace tab that holds it, or in a tab for its folder. Resuming replays the transcript from its last compaction, so the agent has the same context it had when you left. After the daemon restarts, every agent in your workspaces is a saved session until you prompt it, which resumes it the same way.

Inside a session:

Command What it does
/resume List recent sessions (in the full-screen UI: the session picker, also F7)
/resume <id> Open that session
/sessions List recent sessions
/clear or /new Start a new agent in the tab
/compact Summarize the conversation now to free context
/cost Input, cached and output tokens, and cost so far
malac sessions # the 20 most recent sessions
malac sessions list --all -n 50 # include subagent sessions, show 50
malac sessions show <id> # print a transcript and all of its subagents
malac sessions delete <id> # delete one session file

malac sessions show prints the conversation compactly, then each subagent’s transcript indented under it:

main 019a1f3c-… · lora/default · 2026-10-25 14:02
› calc.py has a bug in add, fix it and verify with a python one-liner
● read {"path":"calc.py"}
⎿ 1 def add(a, b):
● edit {"new_string":" return a + b","old_string":" return a - b","path":"calc.py"}
⎿ Edited calc.py:
Fixed `calc.py:2`: …
─ 3312 in · 366 out · $0.0024

Lists show the id, the last update time, the working directory and the session’s title (its first prompt). Subagent sessions carry their label in brackets.

When a request uses more than 80% of the model’s context window, malac summarizes the conversation and continues from the summary. The summary is written by small_model (the session’s own model when small_model is not set), and it is recorded in the transcript, which is where a resumed session starts. Set the window per model:

[models."lora/default"]
context_window = 128000

/compact compacts on demand.

A turn ends when the model answers without calling a tool. As a safety net, an agent is stopped after max_steps tool-call rounds per prompt (default 200). Ctrl+C cancels the current turn and every subagent it started.

Transcripts stay on your machine in ~/.malac/sessions (or $MALAC_HOME/sessions). Anything you paste into a prompt, an API key included, ends up in the transcript. Delete a session with malac sessions delete <id>, from the web UI, or by removing the file.

malac is created by lobirus and released under the MIT license. About malac