Skip to content

docs(claude): correct the empty-conversation guard to its two-case form [skip-ci] - #880

Merged
RonenMars merged 1 commit into
mainfrom
docs/conversation-pending-404
Sep 12, 2026
Merged

docs(claude): correct the empty-conversation guard to its two-case form [skip-ci]#880
RonenMars merged 1 commit into
mainfrom
docs/conversation-pending-404

Conversation

@RonenMars

Copy link
Copy Markdown
Owner

Follow-up to #878, which changed the behaviour this bullet describes.

What was stale

The session-lifecycle bullet still documented the guard as promptCount === 0:

…answers 200 with zero messages whenever SessionStore holds the id and its promptCount is 0. The guard stays narrow deliberately: a session that has sent prompts and still has no transcript is real data loss and still 404s.

Both halves are now wrong in a way that matters.
The counter is no longer the whole test, and the closing sentence asserts flatly that a prompted session with no transcript is data loss — true only past the watcher's deadline since #878.

That sentence is worth more than a routine doc correction, because it is the precise reasoning that left the hole open in the first place: it reads as a deliberate, closed decision, so the next reader has no reason to ask whether "has sent prompts" and "has a transcript" can ever be true at different instants.
They can, for 0.3s–1.7s, every single time a session is first prompted.

What it says now

  • The two cases that reach the 200 are disjoint and are not the same test — promptCount === 0 qualifies indefinitely (an abandoned session never gets a file); a prompted session qualifies only while the transcript is in flight.
  • Why the second case exists, with the production evidence: 4 sessions, 8 of 203 conversation 404s in a 20.5-day log, each bracketed by pty.input_write → 404 → session.jsonl_wired.
  • Why recency anchors on lastActivityAt ?? startedAt and not the spawn — spawn-to-first-prompt ran to 405.7s, so a spawn anchor reopens the hole for anyone slow to type.
  • Where the guard is still narrow: a bound transcript, or a prompted session quiet past the deadline, still 404s.

Scope

Docs only — one bullet in CLAUDE.md, nothing else touched, hence [skip-ci].
No version is cut: docs: is not a releasing type, so main moves once rather than twice.

…rm [skip-ci]

The session-lifecycle bullet still described the guard as `promptCount === 0`, which #878 replaced.
As written it asserted that any prompted session with no transcript is data loss and 404s — now true only past the watcher's deadline, and the exact reasoning that left the original hole open.

Records both disjoint cases, why the second exists, and why recency is anchored on `lastActivityAt ?? startedAt` rather than the spawn.
@RonenMars
RonenMars force-pushed the docs/conversation-pending-404 branch from 28dac13 to 3e41cc6 Compare September 12, 2026 06:55
@RonenMars
RonenMars merged commit d6ec9d3 into main Sep 12, 2026
11 checks passed
@RonenMars
RonenMars deleted the docs/conversation-pending-404 branch September 12, 2026 06:56
@RonenMars

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.90.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant