Skip to content

Muse Code

Muse Code writes one session.jsonl log per session under ~/.local/share/muse/sessions, or under $XDG_DATA_HOME/muse/sessions when that variable is set. Hansard reads those logs and the subagent runs they start.

Source Use it for
muse-code Muse Code sessions and their linked subagent runs.

Hansard reads each session log from start to finish and rebuilds the conversation from its events. Session metadata sets the working folder, which becomes the project, and the model the session started with. A renamed session keeps its latest name as the title. Each run records the model it used, so a session that switches models shows the model on every reply.

Each run’s prompt becomes your message, in the form you typed it, and a prompt you type while a run is working follows as a message of its own. Finished assistant replies, readable reasoning summaries, tool calls, and tool output follow it; partial text streamed while Muse Code was still writing is left out. Each tool approval stays with its call, with the decision and whether you, the automated reviewer, or a rule made it. The token usage Muse Code reports for each response is attached to that reply. When a workflow or a subagent_spawn call starts a child session, Hansard imports the child as a linked subagent run under the call that started it and places its result in the parent conversation. The reminder checks Muse Code runs on its own between steps stay linked to the session but are not listed as its subagents. Skill reads count toward skill usage in Stats, and workflow and subagent_spawn calls count as delegation. Hansard skips logs that change while it reads them or that exceed its size limits, and importing again updates the same session.

Terminal window
hansard import --source muse-code --since all
hansard index rebuild
  1. When the import finishes, open Sessions and selectFilter & sort.
  2. Set Source to Muse Code and setTime to the window you imported. UseFolder to narrow the list when you use this harness in several projects.
  3. Select a conversation to check its messages, tool calls, files, commits, model, and token usage.

To keep archiving new sessions from a local harness, openSettings → Imports. Automaticfollows every supported harness installed on this computer.Custom lets you turn individual harnesses on or off. Cloud sources turn on separately under Cloud agents, and ChatGPT, Claude.ai, Gemini, and Gemini Notebook / NotebookLM exports import withImport export…. Each also has its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with --explain-skips where the source supports it.

  • Your prompts, finished assistant replies, tool calls, and tool output.
  • Tool approvals with their decisions, and readable reasoning summaries.
  • The session title, working folder, model provider, and the model of every run.
  • Input and output token counts for each response.
  • Linked subagent runs started by workflows, with their results.
  • An exact copy of each session log next to the conversation.
  • Hansard reads logs up to 64 MB, with lines up to 16 MB. Larger logs are skipped.
  • A log that changes during the read is skipped and picked up on the next pass.
  • Muse Code can trim the start of a long log at a context checkpoint. Hansard keeps the part it already imported and adds the rest, but it cannot recover turns Muse Code trimmed before Hansard first read the log.
  • Sessions stored outside the default folder need HANSARD_MUSE_CODE_DIR (the sessions folder) or HANSARD_MUSE_CODE_HOME (the Muse data folder).
Terminal window
hansard import --source muse-code --since all
hansard index rebuild