Observed on amplifier 2026.07.06-7ec5dcd, timeline of a fresh interactive session (sub-second polling):
- Process start: banner prints the session ID; nothing exists on disk for it.
- First prompt submit (+~37ms): session dir +
events.jsonl appear (the latter only when the hooks-logging module is mounted).
- First
prompt:complete: metadata.json and transcript.jsonl finally appear.
Problems.
- An interactive session opened and closed without a prompt leaves no trace, despite having announced a session ID.
- A session killed (e.g. SIGKILL) after first submit but before first
prompt:complete leaves an orphan dir containing only events.jsonl — no metadata.json ever — which is invisible to session list and unresumable.
- External tools cannot enumerate or identify live sessions until the first turn finishes;
metadata.json (with its useful working_dir field) arrives seconds-to-minutes after the session actually began.
Ask. Write a minimal identity stub at session creation — even just {session_id, created, working_dir} in metadata.json (updated later with name/description/turn_count as today) — so a session's identity exists on disk for its entire lifetime. This would also eliminate the orphan-dir class in (2).
Observed on
amplifier 2026.07.06-7ec5dcd, timeline of a fresh interactive session (sub-second polling):events.jsonlappear (the latter only when the hooks-logging module is mounted).prompt:complete:metadata.jsonandtranscript.jsonlfinally appear.Problems.
prompt:completeleaves an orphan dir containing onlyevents.jsonl— nometadata.jsonever — which is invisible tosession listand unresumable.metadata.json(with its usefulworking_dirfield) arrives seconds-to-minutes after the session actually began.Ask. Write a minimal identity stub at session creation — even just
{session_id, created, working_dir}inmetadata.json(updated later with name/description/turn_count as today) — so a session's identity exists on disk for its entire lifetime. This would also eliminate the orphan-dir class in (2).