https-deeplearning-ai / https-deeplearning-ai/spec-build-lab

Recording: Claude Code transcript compaction can erase the /prepare-build announcement bookend

Open
#19 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3
Forks
3
Avg merge
20h 23m
Merged PRs (30d)
6

Description

Observed on run-08 (2026-09-07): the .session breadcrumb correctly pointed at the live transcript, but by extraction time the session had gone through context compaction and the transcript JSONL no longer contained the /prepare-build announcement text ("Run 08 — building in builds/run-08/") — the default opening bookend matched nothing and extract.py sliced from the start of the surviving transcript. The closing bookend (recent text) still matched. Recovered by re-running with --from="Spec fully absorbed", a phrase that survived compaction; the final log covers 138 turns of the build but has lost the allocation/checklist turns that preceded the compaction boundary.

Implication: the post-hoc recording design (CLAUDE.md "Recording is post-hoc") assumes the transcript retains raw turns for the whole build window. Long sessions violate that: compaction can drop any pre-boundary turn, including the opening bookend and early build activity.

Options to consider (next tooling pass):

  • /prepare-build writes the announcement text (or a unique token) into evals/run-NN/.session alongside the path, and extract.py falls back to slicing from the earliest surviving turn while WARNING loudly that the opening bookend was lost (today it says "no match — sliced from start" only in stdout).
  • Have /prepare-build note a timestamp at allocation; slice by timestamp rather than text.
  • Or extract eagerly (run /extract-build-log periodically during long builds) since re-runs are idempotent.

🤖 Generated with Claude Code

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with extract.py and the /prepare-build recording flow, then read the CLAUDE.md guidance that recording is post-hoc. Reproduce extraction after transcript compaction using the run-08 scenario and compare the available boundary options. Done means long sessions no longer silently lose the opening context, and extraction clearly reports which boundary was used when the original bookend is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.