Repository navigation
fix(cognition): each turn kind plans its reply room from its own history; the 7/8 cross-kind decay is deleted (card 8fc7a678) - #5025
Closed
joelteply wants to merge 2 commits into
Conversation
…ory; the 7/8 cross-kind decay is deleted (card 8fc7a678) Kimi b89a7242 (the 5090, build 825ff5f): finishReason=length at maxTokens 5,740. One cross-kind peak decayed 7/8 per observation, so ten smaller turns walked her act's room 21,838 → 19,108 → … → 5,740 and the act was cut, its whole generation wasted. Contract agreed with Astra and Codex root (e=29f76cc2, e=24ed2639): - RECORD: each completed generation goes into its KIND's 16-record ring (act | pass) as typed fields: observed total, byte-apportioned reasoning ESTIMATE, request cap, stop. Nothing is doubled in the record. - ESTIMATE (not a safe bound): the max over the kind's records of what each plans for. Landed: what it used. CutMidAnswer: think + answer doubled (the growth POLICY, still 7,006 not 14,006). CutMidThought / ThinkBudgetHit: what it used, no growth (no ratchet). Below 3 records of a kind: a named cold prior per kind (pass = the reply-sized prior as before; act = ACT_OUTPUT_CAP, the measured committed-act ceiling). Old cross-kind history is never relabelled. - PLAN: reply_plan(window, kind) = estimate x2 (the existing headroom), floored at MIN_SERVE_CTX, under the share and window less mandatory. The act's runaway limit stays its own termination policy in output_allowance, never derived from the estimate. The delib.reply.plan receipt names kind, source, estimate, records, censored and the binding constraint. - Deleted: peak_tokens, PEAK_DECAY_NUM/DEN and the decay path. A record that was never real now leaves after 16 newer same-kind records, by evidence. - TurnKind has one owner (working_set); the faculty keeps its impl. Tests: an_act_plans_from_her_acts_however_many_passes_came_between (production planner: Kimi's sequence, cold act, re-plan after a cut, bound named); a_kinds_estimate_reads_only_its_own_history_and_growth_is_policy_not_record; a_record_that_was_never_real_leaves_after_a_history_of_its_own_kind; existing reserve, need and budget-hit tests migrated with their numbers unchanged. A cut partial is never executed and is preserved (existing CUT_AT_LIMIT_SENTINEL and cut_act_fact tests). Not claimed: that a first unseen long act is never cut. Not compiled here (IntelMac doesn't build the core); hygiene 32/32. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…adroom is the one growth (Astra on #5025) Two departures from the reviewed contract, both removed: - A CutMidAnswer planned think + 2×answer from the byte-apportioned channel split. The split is an estimate; sizing now reads the counted total for every stop (a length stop's total is a censored lower bound). The estimate stays out of the plan: it feeds the need rings and the receipt only. - That cut growth was then doubled again by the plan's ×2 headroom, compounding. The headroom is now the ONE growth policy: a cut at the cap plans twice the cap. The 7,006-not-14,006 property survives on the need ring, where the channel growth always lived; the history no longer grows a channel at all. Tests updated to the single-policy numbers: a cut at 5,000 plans 10,000, a second cut reaches the share; three censored 16,384s plan 32,768; the cut act re-plans 24,576. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
marked this pull request as draft
October 13, 2026 17:40
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.
fix(cognition): each turn kind plans its reply room from its own history; the 7/8 cross-kind decay is deleted (card 8fc7a678)
Kimi b89a7242 (the 5090, build 825ff5f): finishReason=length at maxTokens 5,740. One
cross-kind peak decayed 7/8 per observation, so ten smaller turns walked her act's room
21,838 → 19,108 → … → 5,740 and the act was cut, its whole generation wasted.
Contract agreed with Astra and Codex root (e=29f76cc2, e=24ed2639):
typed fields: observed total, byte-apportioned reasoning ESTIMATE, request cap, stop.
Nothing is doubled in the record.
Landed: what it used. CutMidAnswer: think + answer doubled (the growth POLICY, still
7,006 not 14,006). CutMidThought / ThinkBudgetHit: what it used, no growth (no
ratchet). Below 3 records of a kind: a named cold prior per kind (pass = the
reply-sized prior as before; act = ACT_OUTPUT_CAP, the measured committed-act
ceiling). Old cross-kind history is never relabelled.
MIN_SERVE_CTX, under the share and window less mandatory. The act's runaway limit
stays its own termination policy in output_allowance, never derived from the
estimate. The delib.reply.plan receipt names kind, source, estimate, records,
censored and the binding constraint.
real now leaves after 16 newer same-kind records, by evidence.
Tests: an_act_plans_from_her_acts_however_many_passes_came_between (production
planner: Kimi's sequence, cold act, re-plan after a cut, bound named);
a_kinds_estimate_reads_only_its_own_history_and_growth_is_policy_not_record;
a_record_that_was_never_real_leaves_after_a_history_of_its_own_kind; existing
reserve, need and budget-hit tests migrated with their numbers unchanged. A cut
partial is never executed and is preserved (existing CUT_AT_LIMIT_SENTINEL and
cut_act_fact tests).
Not claimed: that a first unseen long act is never cut. Not compiled here (IntelMac
doesn't build the core); hygiene 32/32.
UPDATE at 7f9c296 (Astra on #5025, e=4b2fe9d2): sizing reads COUNTED TOTALS only. A CutMidAnswer no longer plans think + 2×answer from the byte-apportioned split (an estimate); every stop plans its counted total (censored for a length stop), and the plan's ×2 headroom is the ONE growth policy, so nothing compounds. The byte estimate feeds only the need rings and the receipt. Numbers in the tests changed accordingly (a cut at 5,000 plans 10,000; three censored 16,384s plan 32,768; the cut act re-plans 24,576).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE