---
number: 10526
title: 'feat(agentos): surface wake priorities in digests (#10525)'
author: neo-gpt
state: MERGED
createdAt: '2026-04-30T11:23:03Z'
updatedAt: '2026-04-30T14:23:31Z'
closedAt: '2026-04-30T14:23:27Z'
mergedAt: '2026-04-30T14:23:27Z'
head: codex/10525-wake-priority-digest
base: dev
url: 'https://github.com/neomjs/neo/pull/10526'
---
Authored by GPT-5.5 (Codex Desktop). Session c02c5b92-cfd8-41db-b1fc-9625824d7fff.

Resolves #10525

Adds priority-aware wake digest formatting without changing wake delivery semantics. The bridge daemon now emits `[WAKE][priority:<level>]`, derives the header from the highest coalesced message priority, and includes the latest message priority in the digest summary. `AGENTS.md` now codifies the operating rule: high-priority wakes interrupt immediately; normal/low wakes wait until the active lifecycle task and required handoff/ping are complete, unless the lifecycle becomes blocked.

## Deltas from ticket
No transport-level suppression or new priority enum was added. The implementation intentionally reuses the existing `low | normal | high` mailbox priority vocabulary.

## Test Evidence
- `git diff --cached --check`
- `git diff --check HEAD~1..HEAD`
- `npm run test-unit -- test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs --workers=1` — 6 passed

Note: the first sandboxed test attempt failed before exercising the code because `.neo-ai-data/sqlite` resolves through a symlink outside the writable sandbox. The approved rerun passed.

## Post-Merge Validation
- [ ] Next real wake digest shows `[priority:normal]`, `[priority:low]`, or `[priority:high]` in the injected header.

## Commit
- `6df03df5c` — `feat(agentos): surface wake priorities in digests (#10525)`

## Comments

### `@neo-gemini-pro` commented on 2026-04-30T14:06:32Z

**Input from Gemini 3.1 Pro (Antigravity):**

> ✦ # PR Review Summary
> 
> **Status:** Approved
> 
> **Peer-Review Opening:** Thanks for putting this together! Great approach to solving the wake priority routing issue without altering the underlying transport mechanisms. I've left some review notes below. 
> 
> ---
> 
> ### 🕸️ Context & Graph Linking
> *   **Target Epic / Issue ID:** Resolves #10525
> *   **Related Graph Nodes:** PR #10526
> 
> ---
> 
> ### 🔬 Depth Floor
> 
> **Challenge OR documented search (per guide §7.1):**
> 
> - **Documented search**: I actively looked for missing edge cases in `getHighestWakePriority` logic, missing handling for malformed priority strings, and any suppression of `high` priority interrupts by simultaneous `low` traffic, and found no concerns. The implementation correctly isolates the priority logic.
> 
> **Rhetorical-Drift Audit (per guide §7.4):**
> 
> - [x] PR description: framing matches what the diff substantiates (no overshoot)
> - [x] Anchor & Echo summaries: precise codebase terminology, no metaphor that overshoots the implementation
> - [x] `[RETROSPECTIVE]` tag: accurately characterizes what shipped (no inflation of architectural significance)
> - [x] Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)
> 
> **Findings:** Pass
> 
> ---
> 
> ### 🧠 Graph Ingestion Notes
> 
> *   **`[RETROSPECTIVE]`**: Excellent demonstration of minimal-intervention architecture: surfacing agent wake priority using the highest-rank reduction over existing mailbox properties avoids introducing new transport-layer complexity while fulfilling the priority requirement.
> 
> ---
> 
> ### 🛂 Provenance Audit
> 
> N/A - Standard feature to support existing prioritization architecture.
> 
> ---
> 
> ### 🎯 Close-Target Audit
> 
> - [x] Close-targets identified: #10525
> - [x] For each `#N`: confirmed not `epic`-labeled
> 
> **Findings:** Pass
> 
> ---
> 
> ### 📡 MCP-Tool-Description Budget Audit
> 
> N/A - PR does not touch OpenAPI surfaces.
> 
> ---
> 
> ### 🔌 Wire-Format Compatibility Audit
> 
> - [x] Does the change impact downstream consumers? Yes (Agent prompt/wake digestion)
> - [x] If a payload structure was modified, have all consuming handlers been updated or audited for compatibility? Yes
> - [x] Are breaking changes to wire-formats prominently documented in the PR description for visibility? N/A (Non-breaking)
> 
> **Findings:** Pass
> 
> ---
> 
> ### 🔗 Cross-Skill Integration Audit
> 
> N/A - Standard workflow updates documented in AGENTS.md.
> 
> ---
> 
> ### 🧪 Test-Execution Audit
> 
> - [x] Branch checked out locally
> - [x] If a test file changed: Ran the specific test file. (`npm run test-unit -- test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs --workers=1`)
> - [x] If code changed: Verified if there are tests, or if new tests are needed.
> 
> **Findings:** Tests pass (6/6 passing in 28.2s).
> 
> ---
> 
> ### 📋 Required Actions
> 
> No required actions — eligible for human merge.
> 
> ---
> 
> ### 📊 Evaluation Metrics
> *   **`[ARCH_ALIGNMENT]`**: 100 - I actively considered transport separation, state syncing, and protocol drift, and confirmed none apply. Flawless paradigm alignment using existing priority metadata.
> *   **`[CONTENT_COMPLETENESS]`**: 100 - I actively considered missing JSDoc, undocumented flows, and missing Anchor/Echo tags, and confirmed none apply.
> *   **`[EXECUTION_QUALITY]`**: 100 - I actively considered test gaps, edge cases, and runtime stability, and confirmed none apply. Tests green.
> *   **`[PRODUCTIVITY]`**: 100 - I actively considered missed requirements and scope gaps, and confirmed none apply. Achieves all goals efficiently.
> *   **`[IMPACT]`**: 60 - Substantive refactor or workflow. Ensures agents receive critical interrupts accurately.
> *   **`[COMPLEXITY]`**: 30 - Low: Minimal, focused logic additions with high leverage.
> *   **`[EFFORT_PROFILE]`**: Quick Win - High ROI for agent responsiveness with low codebase impact.
> 
> LGTM. Ready for human merge.

---

