Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.d/muse-fork-records.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed
- Muse chat reads a session that `/fork` started in Muse 1.4.13, instead of falling back to
Terminal.
15 changes: 11 additions & 4 deletions docs/muse-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Chat uses Terminal when the log is missing or cannot be read, or when a whole li

- does not parse;
- names a record, a `runtime.session` kind or a run event that is not in the logs of Muse 1.4.2
to 1.4.13 (61 records and 56 run events, from 160 session logs on one test PC);
to 1.4.13 (63 records and 56 run events, from 160 session logs on one test PC and a recorded
1.4.13 `/fork`, which writes two records the 160 logs do not have);
- names another session in its `stream`, as Muse names each log's folder after its session;
- is a record above in another shape: a prompt block other than `text` or a picture (`asset`),
a tool call without `name`, a result without `text`, or a compaction other than `summary_text`.
Expand All @@ -83,9 +84,12 @@ share no bytes.
## Limits

- Prompt cards, slash commands, todos and plans, subagents, pictures and Earlier sessions are
outside this first scope. A picture shows as the `[Image #n]` name Muse gives it.
outside this first scope. A picture shows as the `[Image #n]` name Muse gives it, and a
subagent as its `subagent_spawn` and `subagent_wait` calls.
- A forked session's Chat starts at the fork. Muse copies the turns before it into the fork's
log as `session.fork.turn` records, which are not shown.
- After `/side`, the pane uses Terminal until Muse exits. The side session takes a lock for the
same process and does not end its log, so the pane has two live sessions.
- Only the pages Chat reads are checked. A line further back that Chat cannot read sends that
older page to Terminal, and Chat then shows no turns older than the pages it has. Grok and
Antigravity behave the same.
Expand All @@ -94,7 +98,8 @@ share no bytes.
`tool-outputs/`, which is not read.
- A result recorded after a later prompt, while its call is on an earlier page, shows on a row of
its own.
- What `/rewind` records is not handled yet: Chat can keep the turns it went back over.
- `/rewind` opens a new session in the pane. Its Chat shows the kept prompt without its answer:
Muse writes the prompt again, but keeps the answer only as a `session.fork.turn` record.

## Verification

Expand All @@ -108,7 +113,9 @@ bun run check fast
records as Muse wrote them: tool calls, a failed command, a declined call and a `/model` switch.
Its README says what was replaced. `session.jsonl` beside it is fictional, written in the record
shapes of real 1.4.12 logs, for the cases the recording does not have (a compaction, a long
output). The contract test runs a stand-in process named `muse` in an isolated herdr, checks that
output). `recorded-1.4.13-main.jsonl` and the `-fork`, `-side` and `-rewind` logs beside it are
a second recording: a picture, a file mention, a subagent, and the sessions that `/fork`, `/side`
and `/rewind` opened. The contract test runs a stand-in process named `muse` in an isolated herdr, checks that
a lock naming another pid binds nothing, then reads the recorded session over HTTP, a whole tool
output, a switch to a second session, and Terminal for a renamed record and for a log it cannot
read. It does not run the Muse TUI.
26 changes: 26 additions & 0 deletions server/fixtures/muse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@ The prompts, answers, reasoning summaries and tool results are the session's own
fictional files. 133 of the 504 lines changed. The subagent logs Muse wrote beside it are not
kept.

## Recorded branches

`recorded-1.4.13-main.jsonl`, `-fork`, `-side` and `-rewind` are four `session.jsonl` logs that
Muse Code 1.4.13 wrote on macOS on 2026-10-26, with `muse-spark-1.3` at `max` effort, in an
isolated herdr session, a temporary data directory and a throwaway folder. The user's Muse
settings ran them without approval prompts. The main session holds three prompts:

1. A picture attached with `--image`: what color is it. Muse writes `[Image #1]` in the words and
the picture as an `asset` block.
2. `@shed.txt` picked from the file completion: how many items the file lists. Muse sends the
mention as the words `shed.txt`.
3. Start one subagent that counts the lines of `notes.txt`, wait for it, and give its number.

Then `/fork` opened the fork in a new tab, where one more prompt ran (`-fork`). `/side` asked one
question in a side chat (`-side`). `/rewind` went back to the second prompt, which was sent again
with more words (`-rewind`). `/exit` ended both processes.

The replacements of the first recording apply here too, and also these:

- the data directory with `/home/user/.local/share`, the macOS temporary folder with `/tmp`, and
the user name in `ls -l` output with `user`;
- the `text` of each `developer` message that a fork copies into `session.fork.model_prefix`
(Muse's own instructions and the user's context), with `[removed: <n> characters]`.

257 of the 1178 lines changed. The subagent logs under `subagent/` are not kept.

## Fictional session

`session.jsonl` is written by hand in the record shapes of Muse Code 1.4.12, compared field by
Expand Down
219 changes: 219 additions & 0 deletions server/fixtures/muse/recorded-1.4.13-fork.jsonl

Large diffs are not rendered by default.

660 changes: 660 additions & 0 deletions server/fixtures/muse/recorded-1.4.13-main.jsonl

Large diffs are not rendered by default.

Loading
Loading