Skip to content

Fix confusing fork corner case with user messages children #233

Description

@cboos

I saw this:

Image

Fork point 57e7a875-25a

4481:{"parentUuid":"170e001c-9aa8-4d00-af5e-a8f95025e251","isSidechain":false,"type":"system","subtype":"turn_duration","durationMs":67152,"messageCount":1695,"timestamp":"2026-06-22T17:02:08.905Z","uuid":"57e7a875-25a3-4e84-884a-f73b3bfb73bd","isMeta":false,"userType":"external","entrypoint":"cli","cwd":"/home/cboos/SAM","sessionId":"700af82d-e4a8-4e25-81bd-46d62cb6e5d6","version":"2.1.185","gitBranch":"master","slug":"harmonic-plotting-reef"}

First child:

4482:{"parentUuid":"57e7a875-25a3-4e84-884a-f73b3bfb73bd","isSidechain":false,"promptId":"4c413cc1-5d66-4eda-a9b3-ffe4f69d4717","type":"user","message":{"role":"user","content":"I\nA practical concern here: ..."},"uuid":"5c12f81b-810e-48d8-9385-8a24b6c7a442","timestamp":"2026-06-23T08:35:36.855Z","permissionMode":"auto","origin":{"kind":"human"},"promptSource":"typed","userType":"external","entrypoint":"cli","cwd":"/home/cboos/SAM","sessionId":"700af82d-e4a8-4e25-81bd-46d62cb6e5d6","version":"2.1.185","gitBranch":"master","slug":"harmonic-plotting-reef"}

Second child:

4487:{"parentUuid":"57e7a875-25a3-4e84-884a-f73b3bfb73bd","isSidechain":false,"promptId":"37039ede-6fc4-4190-9e3c-f6e90e5f1c38","type":"user","message":{"role":"user","content":"I'll reply on all these points separately later on..."},"uuid":"6beaf80e-a77c-4f3b-bec2-733866ecc806","timestamp":"2026-06-23T08:39:15.173Z","permissionMode":"auto","origin":{"kind":"human"},"promptSource":"typed",...}

The thing is, the fork point "system/turn_duration" doesn't appear in the transcript (like goes to #msg-d-2 which is the session header message).

I was about to write the title: "Support turn_duration system messages to fix confusing fork corner case", but this could happen with other unsupported system messages as well. The point is, if "something" is a fork point, it shouldn't be ignored (or the fork point should be redirected to the closest visible message).

[OT] Note also the "origin":{"kind":"human"},"promptSource":"typed" bits... first time I see those. It could be interesting to make that visible somehow, to distinguish between different kinds of User messages (well, we already detect the compaction ones, but with a regex, IIRC).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions