Repository navigation
fix(init): say why trail init couldn't read past sessions - #589
rushabhnagda11 wants to merge 1 commit into
Conversation
When the headless `claude -p` call failed, init printed "couldn't read your past sessions this time; trail init again tries again", with no cause. In practice the cause is a `claude` CLI whose sign-in has expired: it answers, with an auth error. Say so, and name the fix. A missing `claude` command (reason no_claude) used to print nothing; it now says that too. Copy only: what is read, when, and when it retries are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🌱 graft blast radiusNothing outside this diff depends on it. 1 area changed; no indexed dependents at depth 2. Who knows this code — 2 people across 1 area
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no Test signal per changed area — 1 ✗Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Found while rehearsing the new onboarding (#585) for the 2026-10-19 metrics review.
What
When the past-session read fails,
trail initprinted:In rehearsal the cause was a
claudeCLI whose OAuth session had expired (claude -preturnsis_error: true, "Failed to authenticate: OAuth session expired"). Runningtrail initagain just fails the same way. Now:reason: "no_claude"(noclaudeon PATH) used to print nothing at all. It now gets its own line.Safety
finishPastRead, the read mark and the retry behaviour are untouched; both reasons already left the mark unwritten, so "run trail init again" is accurate.graft initnever runs the past read (it's gated onTRAIL), so graft output is unchanged.Test
Built the branch and ran
trail initin a sandboxed$HOMEwith four seeded transcripts and a signed-outclaude. The new line prints as above.🤖 Generated with Claude Code