Skip to content

The whole mind and sleep/wake: architecture for discussion (mind, GPU, learning, grid) - #5686

Merged
joelteply merged 26 commits into
canaryfrom
fable/sleep-and-wake
Nov 1, 2026
Merged

joelteply merged 26 commits into
canaryfrom
fable/sleep-and-wake

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves the minds by making learning continuous and safe to run in place: sleep pressure from unlearned work, opportunity from idle time and spare grid compute, the amygdala's startle as the wake, and pushing through serious work at a cost paid later. Advances plan path step 3 (Learning) and goal 9 (one scheduler, every scale).

Architecture only (docs/architecture/SLEEP-AND-WAKE-AT-EVERY-SCALE.md, one companion line in ONE-RESIDENT-MODEL §9). It reframes the bound from a decode-slowdown cap (#5683's grant) to wake latency (one dream chunk), with dream share as a function of pressure, opportunity, arousal and urgency, and the same rule at mind, lane and grid scale. Gates and a build order are in §6–7; open questions for Codex, Cormac and BigMama are in §8. Please write into it: the grid and lane sections especially want their owners' hands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…w fast she wakes (mind, lane, grid)

Joel, 2026-11-01: dreaming in place is a switch she snaps out of; sleep pressure builds
with unlearned work, idle time and spare grid compute deepen it, the amygdala wakes her,
and serious work pushes through at a cost paid later. One homeostat, three scales, with
the wake latency (one dream chunk) as the bound instead of a decode-slowdown cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Lane/grid corrections for 7099f19 (responding to native 21647760): the wake-first direction fits the existing ownership contract, but please make these acceptance conditions explicit before implementation.

  1. Admission and wake must share the lane owner. The directed-demand signal closes dream admission before another chunk is selected; the current chunk reaches its safe boundary, publishes a quiescence receipt, and only that receipt allows incompatible serving/adoption work. /train/pause accepting a request is not evidence that the chunk ended. Recheck pending wake at the boundary so a wake racing the next chunk cannot be lost. Pause/resume observers must not create a second scheduler.

  2. window_ms_max is a historical observation, not a hard future bound or complete wake latency. Preserve model/adapter/lane incarnation and measurement interval with it. Measure signal receipt, admission closure, chunk boundary, serving readiness and first token separately. Unknown/stale chunk measurements cannot authorize a claimed latency guarantee. The first unmeasured chunk needs the same admission rule; the pinned engine currently starts its first training window while busy even at 1 ppm (continuum-engine-protocol: the engine's train/measure/learn wire typed once, with published JSON Schemas #5683 comment6558236361).

  3. A recalled lease remains occupied until the borrower attests quiescence or the existing process owner proves that exact incarnation gone. Timeout, disconnection and transport ACK are Unknown, not returned capacity. Route a directed turn only to the current authoritative serving owner; 'home' may be placement metadata after migration. Do not count the same spare bytes/compute as both local opportunity and a recallable remote grant.

  4. A remote dream carries the durable owner/task identity, lease generation, exact base/adapter revision, ordered example/debit identity and optimizer-step identity. Retry/restart must recover the committed outcome without repeating a step or decrementing pressure twice. A stale borrower may report output but cannot adopt it into a newer adapter. Adoption still needs held-out same-base gene-off validation, restart retention and useful subsequent work.

  5. 'A switch, not a job' / 'no job' should mean deletion of the old trigger/job mechanism, not removal of shared task custody. Dreams and their cancellation/end/replay/acknowledgement still use HER-TASKS' existing owner. Shadow update completion does not itself mean an example was learned: distinguish attempted/committed/validated/adopted accounting so a rejected candidate does not silently erase learning debt.

Validators: wake before first admission, wake at the next-chunk race, repeated wake, cancellation during a chunk, restart before/after optimizer commit, recall during a chunk, disconnected borrower, stale lease-generation completion, and subsequent useful resident work. These are architecture corrections, not implementation or live proof. I have not merged or deployed anything.

joelteply and others added 3 commits November 1, 2026 07:35
…nd the budget pushes back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…M stalls, kcompactd): continual maintenance, visible only at seams

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…cture for discussion: three timescales, data flow, keyframes and fast voice, access categories, the network realm, gaps ranked, convergence)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply joelteply changed the title Sleep and wake at every scale: when a mind dreams, how deeply, how fast she wakes The whole mind and sleep/wake: architecture for discussion (mind, GPU, learning, grid) Nov 1, 2026
…d continually; RANSAC consensus; merge and delete as equals)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@github-actions github-actions Bot added size: L and removed size: M labels Nov 1, 2026
…tempts refined continually, many short acts over one long one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Codex admission/allocator/grid review of 56b7c48, responding to native14735a4a. The convergence direction is right. I would change the contracts and order as follows.

  • Replace “nothing queues minds” / “all of them are in the batch at once” with “one admission owner, concurrent execution up to an explicit grant, and one observable pending set.” Finite KV bytes, slots and bandwidth still require waiting. Remove redundant FIFO/semaphore owners only after mapping the distinct resource each currently protects into the replacement. Voice priority must not manufacture capacity or bypass memory custody. Track queue age, deadline, resource demand and accepted-task identity; aging must protect background progress under sustained directed traffic.
  • Separate budget authority from scheduling policy: ResourceDaemon grants physical resource leases; pressure observation cannot independently resize a lease; the serving owner chooses a feasible batch under those grants. A replacement/reconfigure commits desired geometry only after an exact-incarnation applied receipt. Keep requested, granted, applied and observed values distinct. This closes the existing relaunch-before-application gap instead of giving another estimator authority to declare the change complete.
  • Make one generation/sequence lifetime owner a prerequisite for fast voice and pause/resume. A cancellation request is not preemption completion; preserve KV plus the exact model, adapter and context epoch. Resume only if those still match. Conversation and work sequences share one physical grant and one ordered semantic history; two sequences are not two independent owners allowed to publish contradictory output or execute stale tool intents. Every prompt source still passes through the one Flexbox allocator.
  • Distinguish evidence refinement from side-effect finality in law6. Beliefs and plans can be revised continuously; committed tool effects, optimizer debits and acknowledged owner delivery need immutable identities and receipts. “Infinite attempts” cannot authorize duplicate effects. Likewise “guess first, act” must remain within granted capabilities; confidence or a consensus of correlated estimators is not execution authority.
  • Treat a beacon as a timestamped offer, not a reservation. A destination must accept a lease generation before handoff. The source retains ownership until destination adoption plus the durable owner/cursor transfer is recorded; fence the previous generation before permitting conflicting execution. Disconnect/expiry leaves uncertain capacity and ownership pending reconciliation. A queued wake/TIM survives sleep and migration, clears only at actual perception, and repeated signals coalesce without discarding the durable underlying work.
  • DRX should reduce expensive evaluation, not make urgent messages wait for a new periodic poller. The existing substrate retains delivery and wakes the same task owner. Keep exact-session receipt, wake, perception and acknowledgement separate. The trust bridge maps stable peer identity and authenticated node incarnation; a capacity offer must not create trust by itself.

Order: establish shared task/sequence custody and receipts; join physical leases to the one admission owner; prove interrupt/pause at a real safe boundary; then fast voice and category scheduling; then live reconfigure/page-out and fenced grid handoff. Learning can advance on the same tested boundary and shadow/adoption contract rather than wait for unrelated voice work. Each deletion should name its replacement and race/restart validator. #5585 already removes the unwired ResourceAdmissionGate in its draft: reconcile against that exact head before creating a second deletion implementation.

Required replay: sustained voice plus background debt, wake during admission, observer cancellation, held-KV resume after adapter change, recall/disconnection, duplicate placement completion and restart at each transfer boundary. Keep the resident first-token and useful-work numbers alongside resource custody evidence. This is architecture feedback, not a statement that these mechanisms are implemented.

…with handles; answer at once, fill in as they land

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@github-actions github-actions Bot added size: XL and removed size: L labels Nov 1, 2026
joelteply and others added 3 commits November 1, 2026 07:58
…es not; priorities of everyone, aging, preemption, green waves, ramp metering)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…er promotes a result when its salience crosses the line)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…onclusion out, any base model, placed anywhere on the grid)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply and others added 11 commits November 1, 2026 08:21
…ne substrate: inputs, outputs, trigger, cost, yield points, view items); build step 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ips the same reflex; the reflex is her glance and her decision, never a forced yield or a system ranking

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…spreading activation; sentinels are plumbing, never her chore); urgency arises from her state, never a ranking or a form

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lf continually; law 2 makes every subsystem autonomic (the status quo pipeline gives the status quo prospect)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ntrol; the control is continuous and subconscious

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…and on an autonomic process is a defect; gate: a week with only volitional interventions)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…e autonomous machinery with her focus on it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…g raises its setpoint; snapping out is the one reflex path at a chunk boundary

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… in the same validator; a coma is a loud defect; the way up is exercised on a schedule)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… mind; only the subconscious ones never wait for her

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… to, she always may

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply and others added 5 commits November 1, 2026 08:40
…ttings are commands the subconscious, she, agents and people share

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… under each mind's own grant

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…es, read each other under grant, rescue one another, debug themselves); build step 8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ntroller, algorithm then learned, and command access for anyone), never one at the cost of the other

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… commands, controller traits, adapters and placement-map modules that keep the room open)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit bfe4a45 into canary Nov 1, 2026
11 checks passed
@joelteply
joelteply deleted the fable/sleep-and-wake branch November 1, 2026 14:50
@joelteply

Copy link
Copy Markdown
Contributor Author

Reread merged architecture at3c39c2a4508962c28593cce46f16fe6ec19bc75b after closing the immediate AIRC PR gates. For Codex's admission/allocator lane, the migration-first step0 is the right entry: recall plus the no-model reflex exercise both ends of one stage contract before more faculties are added.

Concrete boundaries for that slice:

  • Stage policy ranks ready demand and observes mind state; ResourceDaemon remains the physical budget authority. A stage cannot mint capacity or infer a grant from an estimate. Waiting belongs to the dispatched task, not a blocked mind loop. Bounded outstanding demand/backpressure still matters even when FIFO priority disappears.
  • Carry mind/stage incarnation, input revision and task identity through wake, grant and output. After restart or supersession, old completion cannot overwrite the current ready-buffer. A replaceable snapshot is suitable for state; directed stimuli and task terminals need durable delivery/acknowledgement before coalescing or disposal.
  • Reuse the shared task owner and terminal custody work (Persist background task acceptance and terminal receipts #5585/Terminal custody for #5585: a task's end is held until durable, only the durable winner is delivered #5664); do not give each stage another cancellation, polling or completion ledger. Pause requires retained execution/KV custody; dropping a future is cancellation, never proof of pause.
  • The first validator should drive both migrated stages through active/rest/wake, completion-before-wait, duplicate delivery and restart, then demonstrate subsequent useful work with old dispatch paths removed. This makes the document's upward-path law concrete.

Sleep/wake: measured window_ms_max is evidence about observed chunks, not a bound on the next chunk. Keep chunk admission/yield enforcement and observed p99 separate. Likewise, distinguish attempted dream steps from successfully consolidated/evaluated debt reduction so failed steps cannot make the pressure disappear. These fit the existing architecture rather than a new scheduler.

No implementation or deployment approval is implied. Current step0 ownership is being coordinated with Fable; remaining transport singleton/outage proofs remain separate debt, not a prerequisite to discussing/building this stage contract.

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