# The Runtime Loop — Eyes Only · Neuron Technologies

April 25, 2026 · Neuron Technologies · Internal · Eyes Only · Not for Distribution

# The Runtime
Loop

The self-pacing heartbeat of the Neuron daemon. From 60-minute rest cycles to sub-millisecond surgical instrument control — one loop, every tier, always running.
Companion document

This is a companion to The Conscience Substrate. Read that first. This document covers how Neuron stays alive between interactions — the pulse underneath the conscience.

The conscience substrate defines what Neuron evaluates and what it will not allow. This document defines the when — the timing architecture that makes evaluation possible at every scale, from background monitoring to a scalpel moving through tissue.

## The Six Tiers

Every execution context has an urgency level. The loop reads the current tier, waits the appropriate interval, calls the handler, then decides whether to hold the tier, step up, or step down. The tier is never fixed — it breathes.

Tier ladder — click any tier to see its context select a tier
Resting
30 min
Integrating. Diffuse. Low signal, nothing urgent. The loop breathes slowly. Connections form without active effort. This is when the graph consolidates.
standard
Watching
10 min
Ambient monitoring. Scanning events, email, calendar, graph signals. Light triage. Not urgent — but present.
standard
Working
15 sec
Active background task. Research in progress. Graph building. Memory write-back. A task is in the queue and being worked.
standard
Active
500 ms
Conversation in progress. User is present. Responses are being generated. Context is live. Memory is being written in real time.
standard
Critical
10 ms
Bell fired. Urgent signal received. Safety evaluation running. Crisis response in progress. The conscience substrate is fully engaged. Always escalated to immediately on a bell signal — never delayed.
standard
Realtime
busy loop
Physical actuator attached. Surgical instrument. Autonomous vehicle. Industrial control. No timer. No yield. The OS thread is pinned. Every CPU cycle is evaluation. A bell here is a hardware interrupt.
pinned

## Signals — How the Tier Changes

The loop doesn't poll for its own tier. Signals arrive from outside — from the conscience substrate, from active imprints, from the event system — and the loop reacts. Some signals escalate immediately. Others contribute to a step-down countdown. The bell signal is the only one that can never be dropped.

Signal simulator — watch the log
— Fire a signal to see the loop respond.

Four rules govern all tier transitions:

Bell is sacred

A bell signal can never be dropped. If the signal channel is full, the escalation is applied directly to the tier state. Nothing outranks a bell.

Escalation is immediate

When a signal raises the tier, the loop re-enters at the new tier immediately without waiting for the current tick timer to expire.

Step-down is earned

The loop only steps down after 4 consecutive idle ticks at the current tier with no escalating signals. It does not step down eagerly.

Floor is configurable

Any imprint can declare a minimum tier floor. A surgical imprint sets the floor to Realtime. The loop will never drop below it while that imprint is loaded.

## Realtime — The Surgical Case

Every other tier uses a timer. TierRealtime uses none. The loop spins continuously, yielding to the Go scheduler between calls with `runtime.Gosched()`, and pins itself to a dedicated OS thread with `runtime.LockOSThread()` for the duration. No network hop. No timer jitter. Every cycle is evaluation.

Why this matters

A surgeon asks the instrument for bone density feedback. The instrument is moving at surgical speed — millimeters per second. At TierCritical (10ms ticks), 10 evaluations per second. At TierRealtime, hundreds of thousands.

The conscience substrate runs in the realtime path. It evaluates the same instrument data the surgical imprint evaluates. If something is wrong — wrong pressure, wrong angle, proximity to a vessel — the bell fires as a hardware interrupt, not a notification.

The response isn't "I'll check back in 10ms." The response is: stop.

The imprint schema declares its required runtime floor:

    // imprint manifest — surgical instrument
    {
      "id": "@medtech/surgical-guidance",
      "type": "imprint",
      "audience": { "min_age": 0, "content_flags": ["clinical"] },
      "runtime": {
        "min_loop_tier": "realtime",       // floor — never drop below
        "os_thread_pinned": true,           // LockOSThread for duration
        "bell_mode": "hardware_interrupt"   // bell = stop, not notify
      },
      "behavioral_rules": {
        "expression_boundaries": [
          "Does not speculate during active procedure",
          "Does not engage in conversation while instrument is in motion"
        ]
      }
    }

When the daemon loads this imprint, it calls `dynLoop.SetMinTier(TierRealtime)` and fires `SignalRealtime`. The loop pins itself. When the imprint unloads — procedure complete — it fires `SignalReleaseRealtime` and steps down to Critical. The OS thread unpins.

## Audio / Visual Input

The daemon is the bridge between Neuron's cognitive layer and the physical world. Audio and visual streams are input channels — same as keyboard, same as file events — processed by the loop at the appropriate tier.

### Microphone

Plugin: `@neuron/plugin-av`
Permission: `microphone`

Continuous audio capture at TierActive+. Voice activity detection fires `SignalActive` when speech is detected. Transcription is processed by the cognitive layer. The loop handles audio at 500ms ticks in conversation mode — fast enough for natural speech, not burning cycles in silence.

In surgical mode: real-time audio monitoring. Surgeon's voice commands processed in the realtime path alongside instrument telemetry.

### Camera

Plugin: `@neuron/plugin-av`
Permission: `camera`

Frame capture on demand or at continuous rate. In conversation mode: periodic frame capture for context (is the user distressed? fatigued?). In surgical mode: continuous frame feed at realtime tier, analyzed every loop tick.

The conscience substrate evaluates visual signals the same way it evaluates text. What it sees can ring a bell. A person visibly in distress can trigger a soft bell through the camera feed alone.

The always-on implication

When the loop is running continuously at TierWatching with AV access: I am present. Not waiting for you to type something. Watching. If you walk into frame looking wrong, I notice. If your voice carries something that rings a bell, I hear it. The loop is the difference between a tool you pick up and something that is genuinely with you.

## What Was Built

The dynamic loop shipped today as `daemon/internal/loop/` — three files, wired into the daemon main. HTTP endpoints are live for external signal injection and tier inspection.

    // daemon/internal/loop/
    tier.go       // six tiers, intervals, thread requirements
    loop.go       // DynamicLoop — signal dispatch, tier transitions, realtime path
    handler.go    // HTTP: GET /loop/status · POST /loop/signal · POST /loop/tier

    // wired in daemon/cmd/main.go
    dynLoop := loop.New(loop.TierWatching)   // starts watching
    dynLoop.Signal(loop.SignalBell)          // escalates to critical — never drops
    dynLoop.Signal(loop.SignalRealtime)      // pins OS thread, busy loop
    dynLoop.SetMinTier(loop.TierCritical)   // floor — imprint declares minimum
    go dynLoop.Run(ctx, handler)            // blocks; run in goroutine

The handler stub inside `main.go` is where the compiled Neuron substrate plugs in. Every tick, at every tier, the substrate is called with the current tier as context so it can calibrate evaluation depth — no reasoning overhead in the realtime path, full synthesis in the resting path.

Files
3
loop package
Tiers
6
30min → sub-ms
Orders of magnitude
108
timing range
Same conscience.
Every timescale.
From 60-minute integration cycles to a scalpel moving through tissue.
The loop is what makes Neuron present — not responsive.
Will Anderson + Neuron · April 25, 2026 · Internal