Skip to content

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
canaryfrom
8fc7a678/persona-context-path-is-full-of-fixed-co
Closed

joelteply wants to merge 2 commits into
canaryfrom
8fc7a678/persona-context-path-is-full-of-fixed-co

Conversation

@joelteply

@joelteply joelteply commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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):

  • 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 COUNTED TOTAL over the kind's records (see UPDATE).
    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.

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

…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
joelteply marked this pull request as draft October 13, 2026 17:40
@joelteply

Copy link
Copy Markdown
Contributor Author

Closed in the 2026-10-30 triage against the merged design (#5607): superseded by #5610 (reply claims her measured need, no runaway cap), and its fixed multiplier is an open-loop rule (HOW-A-MIND-GETS-WHAT-SHE-NEEDS R1). The output side continues as L1 in that design.

@joelteply joelteply closed this Oct 30, 2026
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