Repository navigation
A mind's reply reserve is her measured output tail; her reply writes into the window's physical room - #5485
Closed
joelteply wants to merge 2 commits into
Closed
A mind's reply reserve is her measured output tail; her reply writes into the window's physical room#5485joelteply wants to merge 2 commits into
joelteply wants to merge 2 commits into
Conversation
…tes into the window's physical room The plan reserved the act's runaway bound (12,288) for every reply on the M5's 58,880 window, while replies measured p99 1,202 and max 1,526 (24 h, reasoning included), so her view got ~22k and turned over every 2-4 acts. The reserve that sizes her view and the request's max_tokens are now separate: - reserve = max of her last 64 measured outputs x 5/4 (working_set/reply_tail.rs, persisted with her emission record), cold prior before 3 turns; reply_claim wants it, and view.rs no longer forces acts to ACT_OUTPUT_CAP - max_tokens = the window's physical room after the prompt, under the runaway bound (now only a loop guard), never below the reserve (DeliberationPromptView::reply_allowance) - an engine count past the estimate that overflows only the room past the reserve is re-quoted with her view whole; a refit makes room for the reserve, never the allowance - validator: replay of the M5's landed outputs asserts <= 2.1% of replies exceed the reserve Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ing the tools The earlier ~22k subtracted the tool schemas on top of delib.window.flex's framing_tokens, which already includes them. From 30 probe rows at the M5's 58,880 window: view + history room median 30.3k with the 12,288 reserve, 40.8k with each mind's measured max x 5/4. Comment and doc text only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
Contributor
Author
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.
Serves the minds by: giving each resident's own view the room that was held for a reply she never writes, so she keeps more of her own context. Plan goal 7 (one budget) and order-of-work line 2 (context as an epoch).
What changed
The reserve that sizes her view and the request's
max_tokenswere one number. An act forced both toACT_OUTPUT_CAP= 12,288. They are now separate:working_set/reply_tail.rs, persisted inemission.jsonwith#[serde(default)], so legacy files load as an empty ring). Before 3 turns the cold prior stands.reply_claimwants it, andview.rsno longer forces acts to the runaway bound. What no claim takes is her view's room to grow into.max_tokens= the window's physical room after the prompt, minus one token, under the runaway bound (now only a loop guard), never below the reserve (DeliberationPromptView::reply_allowance).delib.reply.room_requoted, bounded by a strictly rising count). A refit after a real overflow makes room for the reserve only.docs/architecture/MIND-CONTEXT-AND-ENGINE-CONFIG.md.Measured
Source: M5 prompt captures (
~/.continuum/fixtures/prompt-captures), 24 h to 2026-10-26, 1,063 completions joined to their submitted rows.usage.outputTokens == timing.decodeTokenson 1,063 of 1,063 rows, so reasoning tokens are counted.max_tokens= 12,288.length, all at squeezed allowances of 266-1,240 and almost all inside reasoning. None came near 12,288.Reserve rule, replayed (each reserve read only from that mind's earlier turns):
The validator is
the_tail_reserve_holds_the_measured_exceed_rate_on_the_m5_captures. It replays the committed fixturecontinuum-cognition/fixtures/reply-output-tokens-m5-2026-10-26.json(output counts only) and asserts at most 2.1%.View room, before/after (from probe rows, corrected): at the 58,880 window, room for her view + history = window −
framing_tokens−required_tokens− the reply's grant.framing_tokens(13,463) already includes the tool schemas: Benchy's system prompt is ~2.7k tokens and his 38 schemas ~10.3k. An earlier version of this body subtracted the tools a second time (~22.6k → ~33k); that was wrong. Over the 30delib.window.flexrows at 58,880 (Aiko, Atlas, Benchy), the median is 30.3k → 40.8k (+10.5k, +35%): the 12,288 reserve replaced by each mind's max × 5/4 (1,783-1,908). On a squeezed row (large required input, reply granted < 12,288) the gain is smaller: Benchy at 23.6k required goes 16.8k → 19.9k. This counterfactual is computed from the probe's components; it is not a live read.Prefill, measured with the S1 append-tail replay (#5482,
--purpose "" --append-tail 173, her measured max × 5/4 in place of 12,288, captures at a 76,032 window):Benefit, as measured: her view holds about 16% more context, with 16% fewer turnovers. Total prefill rises 4.7%, because there are fewer turnovers but each one is larger. This PR does not claim a speed gain. Speed has to come from cheaper turnovers.
Live read owed after deploy:
delib.window.flexreserve/unallocated,delib.reply.room_requotedcount, thelengthfinish rate (baseline 1.2%), and acts/hour plus seconds per act at four residents. Owner: Fable, at the first deploy window after merge.Validation (local, worktree build at 95e00ac; the follow-up commit is comment and doc text only)
cargo test -p continuum-cognition --lib --features continuum-engine/metal: 1,184 passed, 0 failed.cargo test -p continuum-core --lib,mind_integration::registry::deliberation: 18 passed.ipc::command_ingress::served_concurrentlyfailures. They are unrelated (timing under parallel load) and pass when run alone.unjustified_unwraps1937 -> 1936;underived_boundsheld at 148 (the new constants carryderived-or-floor:).oversized-edits.sh origin/canary: clean. Every touched file is under 1,000 lines (working_set.rs935,contribute.rs855,reply_reserve.rs917).Tests changed
reply_reserve.rs: the cap test now asserts the physical allowance. New:an_act_reserves_her_measured_tail_and_may_write_past_it(58,880 window).capacity_and_wire.rs: the wire carriesreply_allowance. New:an_overshooting_reply_room_is_requoted_never_paid_for_with_her_view.turn_window.rs: the unmeasured turn reserves the cold prior and its request may reach the runaway bound.reply_claimtakes the reserve.window_feedback.rs: the refit fixtures overflow the prompt (not the elastic room), and the final request is checked against the last refusal's density.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo