Repository navigation
fix(server): report whether a new session was written; cap the run turn limit - #533
Merged
Merged
Conversation
…rn limit - POST /api/session/new answered `persisted` from the request flag. It now says whether the save succeeded. - A run's `max_turns` replaced the daemon's own limit. The daemon's limit is now a ceiling a request can only lower. - The protocol documents that `persist: false` only skips the save at creation; the first run saves the session. Co-Authored-By: Claude Fable 5.2 <[email protected]>
mrnasil
enabled auto-merge (squash)
December 2, 2026 16:50
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the same source audit as #527–#532.
persistedwas the request flag.POST /api/session/newanswered"persisted": truewhenever the caller asked for it, even when the save failed. It now reports what happened.warn_persistreturns whether the write succeeded.max_turnsfrom a run request replacedAppState::max_turns. The daemon's limit is now a ceiling: a request can ask for fewer steps, not more.whycodes servesets no limit today, so nothing changes there until one is configured.persist: falseis documented on the protocol type as creation-time only: the first run saves the session.Not changed
Rename, rewind and compact still answer 200 when their save fails (the change is already applied in memory, and the failure is logged).
persist: falsedoes not keep a session out of the database for its whole life; that would need a per-session flag honoured by every save and by idle eviction.Verification
New tests for the turn limit rule and for
persistedwith a working and an unopenable database. Linux line coverage ofwhycodes-servermeasured locally: no missed lines.🤖 Generated with Claude Code