dotbabel

Heads Up to peer Advisor: integration feasibility

Evidence labels

Each claim carries one label:

Privacy: this report quotes no note text, no conversation content, and no credentials. Session IDs are cut to 8 characters. Store contents are reported as key names and counts only.

Executive summary

“Heads Up” is a tag of the “You should know” feature. The feature is a built-in Claude Code mod, cc-plugin-you-should-know@builtin. It is off by default. A tool-less side request to the session’s model rereads the conversation and proposes one note. The note shows above the prompt in the terminal or Desktop app (D, interactive mode).

No supported interface delivers the note text to a third party:

Two automatic paths are technically possible, but both read an undocumented payload of a closed-source built-in mod:

dotbabel can already receive such a warning without structural change. dotbabel peer ask --pair ID TEXT enqueues free text to the paired Advisor from any shell, with no session identity (plugins/dotbabel/src/peer/cli.mjs:111-124, :677-683). The Advisor skill already routes “investigate this” requests to peer ask (skills/peer/SKILL.md:102-104). Three gaps make that path weaker than it should be:

Decision: MANUAL FIRST. Close the three gaps with a thin heads-up entry on top of the existing queue. Keep automatic capture as one gated experiment (Validation plan, E1). Do not build a store-file watcher.

Verified findings

1. What the feature is

# Finding Label Evidence
1.1 “You should know” is a built-in mod, off by default, that needs Claude Code v2.1.287 or later. You turn it on with /plugin enable cc-plugin-you-should-know@builtin. D interactive-mode#you-should-know-suggestions
1.2 “Heads up” and “You should know” are the two tags of one feature. The binary maps {"You should know":"you_should_know","Heads up":"heads_up"}. O Byte 277116113 of the 2.1.307 binary (Python byte search)
1.3 “A side agent rereads the conversation from time to time … is a separate request to the same model and has no tools.” D Same page
1.4 The side request is $.model.fork({prompt}). Its reply format is learn: none, or learn: / tag: / explain:. O s.model.fork({prompt:…}) and the learn: none instruction near byte 277.1 M; the fork type is public (D: claude-code.d.ts, model.fork: “Runs one tool-less completion over the session’s OWN transcript … Null on a cold snapshot or an API error”)
1.5 The mod declares hooks on prompt.submit, command.run, turn.step, ui.render, session.detach, and session.end. Its calls include model.fork, prompt.fill, prompt.submit, store.*, and telemetry.*. It never calls ui.notify. O Declared calls:[…] list and ui.render {component:"AbovePrompt"} hook in the mod code; no ui.notify within ±60 KB of the mod’s tag map
1.6 The check runs only for the main agent, on a cadence (reported as every 6th model request), asynchronously, and backs off after ignored notes. O-agent, partly H I did not find the %6 cadence expression. Treat the exact cadence as unverified.
1.7 Checks cost plan usage or API money: “several thousand tokens” of instructions plus the reply, billed in full on every check. D Cost of checks
1.8 Availability: only with a direct claude.ai or Console connection, not through an LLM gateway, an apps gateway, or apiKeyHelper. Not in a session without feature flags, such as one with DISABLE_TELEMETRY. Not in the first session after an upgrade. D Same page
1.9 A server feature gate (tengu_jolly_dewdrop) and a compliance check (not HIPAA, ZDR, or LDR) also gate the mod. O (gate string, 2 hits), O-agent (compliance) Byte search

2. How a note is delivered

# Finding Label Evidence
2.1 The note draws in the AbovePrompt render site, with the choices Learn more, Knew this already, and Dismiss. D, O Docs example; AbovePrompt is rendered on “Terminal, Desktop” only (mods reference, render sites)
2.2 “The main agent doesn’t see a note unless you send it with Chat in main session.” That choice quotes the note into the prompt input. D Answer a note
2.3 No transcript entry type, subtype, or key is specific to the feature (45 recent transcripts checked). O-agent Entry-type census only, no content read
2.4 In -p and SDK sessions the check stops early, because no surface is attached. O-agent Not repeated

3. Persistence

# Finding Label Evidence
3.1 Recent notes and known topics live in a file “whose name starts with cc-plugin-you-should-know under ~/.claude/plugins/store/”. Claude Code deletes it after cleanupPeriodDays without use. D Answer a note
3.2 The file is cc-plugin-you-should-know_builtin-19776595df2c.json, mode 600, about 21.6 KB. The suffix is the first 12 hex characters of sha256("cc-plugin-you-should-know@builtin"), so the path is predictable. O ls -la ~/.claude/plugins/store/; printf %s 'cc-plugin-you-should-know@builtin' \| sha256sum
3.3 Top-level keys: sessions (32 records of id, askedTurn, offeredTurn, tag, plus an optional view), seen (50), known (50), typedPastInARow, looksToSkip. O Key and count dump, no values printed
3.4 An open note is sessions[].view = {kind: "offer", line, explanation, shownAt}. The open offer belonged to one session at about 12:00 and to another session at about 13:30. Each record’s view is overwritten as notes come and go. O Two dumps about 90 minutes apart
3.5 sessions[].id equals the Claude session ID (32 of 32 matched transcript file names). The turn IDs did not match transcript entries. O-agent A note links to a session, not to a turn
3.6 Claude Code’s own reads also change the file’s mtime, so mtime does not signal a new note. O-agent Not repeated

4. Official interfaces

# Finding Label Evidence
4.1 Settings hooks: the binary has the documented hook events. None of them fires with note text. plugin_notification fires only from $.ui.notify, which this mod never calls. O-agent, O (1.5) hooks
4.2 Telemetry: in a mod you install, a telemetry hook must use the filter { to: 'collector' }. The mod’s records have no to field and no note text. D, O-agent mods reference, Telemetry
4.3 “Every mods API method is also an event … A hook on one intercepts calls from the mods that run after it.” next.origin gives { plugin, tier }, and the tiers run in the order prepend, user, append, builtin. D mods reference, Mods API calls and the hook function
4.4 By 4.3, a user-tier mod should see the built-in mod’s model.fork call (and its reply through next) and its store.set writes. H The mechanism is documented in general. It was not tested live against this mod.
4.5 The mod’s source is not public. The public mods/ folder holds agents-md, diff, sec-default, telemetry, and types only. O gh api repos/anthropics/claude-code/contents/mods
4.6 The docs give no guarantee about the note text, the tag meaning, the fork prompt, the reply format, the store schema, or the timing. D (absence) Pages above

5. Lifecycle

6. Observed in this session

This session received a Heads Up about its own work: a flaky-test fix could switch a speed check from clock time to CPU time. The user forwarded it by paste, and it changed the result: the owner chose a load-aware check that keeps both measures (PR #561). This is one data point that the notes can be high-signal. It also shows that the user-mediated path works today.

A second note arrived later in the same session, about the Advisor secret-search fix (PR #563). It warned that a secret-like name such as credentials.ts could block every broad Advisor search. The main session measured the risk before it answered: across 54 repositories under ~/projects, one repository would block a root search, and its matching file is a tracked *.key file, not a false positive. Both notes needed an investigation against current code before action, which is the Advisor behavior this report proposes.

Current architecture

All paths are relative to the repository root. P = plugins/dotbabel/src/peer.

Capability Where Reusable for Heads Up?
Per-repository ledger, atomic writes, process lock P/store.mjs:176-191, :227-228, :325-355; repository key P/identity.mjs:36-46 Yes. A forwarded note is a normal request.
Pairing; one open pair per session P/state.mjs:63-96, :115-145, :65-69 Yes. A Main session maps to exactly one Advisor.
Member key harness:sessionId P/identity.mjs:121 Yes. The note’s sessions[].id is the Claude session ID (3.5).
Advisor queue: priority then FIFO, leases, recovery, 3 attempts P/state.mjs:232-247, :250-284, :287-293, :312 Yes
enqueue(body, {dedupe, parentId, priority, forward}) P/state.mjs:194-229 Yes, unchanged
Caller-key deduplication per pair P/state.mjs:53-60 Partly: the key is manual and scoped to one pair
ask without session identity when --pair is given P/cli.mjs:111-124 (EXTERNAL set), :677-683; body is args.join(" ") at :230-236 Yes. This is the manual path today.
Free-text request record (no source, sender, commit, or worktree fields) P/state.mjs:213-226 Gap
Untrusted-data label on messages P/relay.mjs:12, :20-23; skills/peer/SKILL.md:87-93 Messages yes. Request bodies get no label in next (P/cli.mjs:210-216).
Forward policy actionable / never / explicit P/state.mjs:201-202 Yes: “escalate only substantiated findings” maps to actionable
Message kinds incl. finding; reply correlation; 30 messages per minute per sender P/state.mjs:5-12, :321-392 Yes, for the Advisor’s verdict to Main
Relay with Claude socket, Codex queue, and native transports P/relay.mjs:56-135, P/transport.mjs:9-122 Yes. Harness-agnostic after the ledger.
Read-only Advisor guard and read scope P/hooks.mjs (PreToolUse branch) Yes. The Advisor investigates read-only.
Advisor intent table: “Investigation … → dotbabel peer ask” skills/peer/SKILL.md:102-104 Yes. The current paste-into-Advisor workflow already enqueues.
A session-only Claude mod, loaded with --plugin-dir and gated on measured Claude Code versions plugins/dotbabel/src/adaptive-session-routing/claude-launcher.mjs:18-29; claude-mod.mjs:19; VERIFIED_CLAUDE_MAIN_VERSIONS The precedent for an automatic path, if E1 passes
Project opt-in, default off schemas/dotbabel.config.schema.json:223-237 (model_intelligence.enabled, adaptive_routing.enabled) The pattern for any peer.heads_up setting
Watchers or daemons None. The only loop is the relay pump, polling each second (P/cli.mjs:174-204). No observer to reuse

Exists: a durable queue, leases, recovery, manual dedupe, labeled messages, harness-agnostic delivery, an external ask entry, and a mod-loading precedent.

Planned, not implemented (as the repository states it): mid-turn steering of a busy Main (P/cli.mjs:59, docs/peer-collaboration.md:443, :456-458). No peer spec exists under docs/specs/.

Missing for Heads Up: a data label on request bodies, a content-derived dedupe key, provenance in the request, and any capture of the note itself.

Integration options

Option Feasibility Reliability Compatibility with updates Effort Maintenance risk
A. Manual forwarding (peer heads-up TEXT, or paste into the Advisor) High. Works today through ask (O). High: the user picks the note. No missed or duplicate capture beyond what the user does. High: depends on no Claude Code internal Small Low
B. Official event (settings hooks, Notification, OTel, SDK) None today (4.1, 4.2, 2.3, 2.4) n/a n/a n/a n/a
C. Store-file observation (watch or poll ~/.claude/plugins/store/…) Medium: the path is documented and predictable (D, O) Low. The schema is undocumented. The view is overwritten in place (3.4). mtime changes on read (3.6). Short-lived offers can fall between polls. No per-turn link (3.5). Low: any schema change breaks it silently Medium High
D1. dotbabel mod intercepting the built-in mod’s store.set or model.fork Medium: the mechanism is documented (4.3). Applying it to this mod is untested (4.4). Medium. store.set reports the displayed offer. model.fork reports candidates before the mod’s own filters. Low to medium: the payload is undocumented (4.6). Version gating like VERIFIED_CLAUDE_MAIN_VERSIONS limits the damage. Medium. The main session must load the mod (session launcher or persistent plugin). Medium to high
D2. Chat in main session plus a Main UserPromptSubmit hook High for capture: documented user action, documented hook High, but it costs one main-agent turn, and Main sees the note Medium: the quote prefix is observed, not documented Small Low to medium
D3. Terminal-output scraping or editing the built-in mod Excluded by the task constraints        

Per-dimension notes for the two real candidates:

Dimension A. Manual D1. Mod intercept
Undocumented behavior None Payload shape, reply format, store schema, tag meaning
Portability Any OS that runs dotbabel Terminal and Desktop only (2.1). First-party connection only (1.8).
Runtime overhead None One pass-through hook per mods call of interest
Extra model or token cost One Advisor investigation per forwarded note The same, for every note. The checks themselves are the user’s existing cost (1.7).
Security and privacy The user consents per note Conversation-derived text leaves the session without per-note consent, and can reach another provider when the Advisor runs on Codex
Failure modes The user forgets to forward Silent loss after an upgrade; feedback loops (see Deduplication); flood after a burst of notes
Fit with dotbabel Uses enqueue unchanged Reuses the launcher pattern, plus a new version gate to maintain

Proposed integration design

Event flow

Heads Up shown (Main terminal)
  │ user copies the note, or picks "Chat in main session"
  ▼
dotbabel peer heads-up [--pair ID] "NOTE"           ← new thin entry (Main shell or Advisor terminal)
  │ normalize text → dedupe = "hu-" + sha256(normalized)[0:16]
  │ body = data label + provenance header + note text
  ▼
enqueue() in the existing ledger (state.mjs:194-229), forward: actionable
  │ relay wakes the Advisor (unchanged)
  ▼
Advisor: peer next → read-only investigation → classify
  │ actionable | already addressed | false positive | inconclusive
  ▼
complete(result)  ── only "actionable" ──► peer send main --kind finding (evidence, impact, action, uncertainty)

Minimal integration boundary

Routing

The Main session ID maps to exactly one open pair (state.mjs:65-69), and the pair names its Advisor. Several projects, worktrees, and concurrent Claude or Codex sessions do not need a global Advisor:

Deduplication and lifecycle

Concern Manual-first answer
Same note twice Content-hash dedupe key, scoped to the pair
Reprocessing after a restart The ledger persists, and a running request is recovered (state.mjs:287-293)
Dismissed or obsolete notes Not observable through a supported interface. The user decides by forwarding.
Several similar notes No semantic dedupe without a model. The Advisor links them with --parent.
Feedback loop (Advisor finding → Main conversation → new note → forwarded) A manual path cannot loop without the user. An automatic path would need a rule such as “never capture within N turns after a peer message.”
Delivery guarantee At least once into the ledger (dedupe makes it idempotent). Relay delivery stays as today.
Backpressure The existing 10,000-item and 32 MiB limits. A manual path is limited by the user.

Advisor behavior

This is a skill-text change, not code. The Advisor treats a claude-you-should-know request as a hypothesis:

  1. Inspect the project state.
  2. Try to reproduce or find evidence.
  3. Classify the note as actionable, already addressed, false positive, or inconclusive.
  4. Record the classification in complete.
  5. Send a finding to Main only for an actionable note, with evidence, impact, recommended action, and uncertainty.

The existing guard keeps the Advisor read-only, and the existing labels keep note text from becoming an instruction.

User control

Mode Where Default
Manual only No setting needed On
Require confirmation before enqueue / automatic enqueue .dotbabel.json peer.heads_up.mode: "off" \| "confirm" \| "enqueue", following model_intelligence.enabled (schemas/dotbabel.config.schema.json:223-227) off. Add the setting only if E1 passes.
Severity threshold Not proposed. The feature exposes two tags and no severity (1.2). n/a

Cross-harness

After ingestion, the request is free text in the shared ledger, so a Codex Advisor claims it like any other request. No new event abstraction is needed. A future Codex-native warning would use the same entry with another source value. That stays within the “no general observer framework” constraint.

Critical assumptions

# Question Answer Confidence Evidence and limits
1 Can dotbabel reliably detect a newly generated Heads Up? Not through a supported interface. Possibly through a mod intercept (D1), untested. High that no supported interface exists; low for D1 4.1-4.4, 2.3
2 Can it get the complete warning contents? Manually, yes. D1 should see line and explanation (3.4). High (manual), medium (D1) 3.4; payload undocumented
3 Can it link the warning to its session and project? Yes, to the session. Not to the turn. High 3.5; identity.mjs:121; a mod has $.session.id, cwd, repo (D, mods API table)
4 Can it tell new warnings from old ones? Manual: the user decides. Store: only by diffing an overwritten view. D1: each call is an event. Medium 3.4, 3.6
5 Can it avoid duplicate delivery after restarts? Yes, with a content-hash dedupe key in the durable ledger High state.mjs:53-60, store.mjs:176-191
6 Can ingestion run without interfering with the main session? Manual: yes. D1: a pass-through hook is designed not to change behavior, but it runs inside Main. High / medium Mods limits: 10 s per hook (Limits)
7 Is there a supported API? No API for note content. The interception mechanism is documented; its payload is not. High 4.3-4.6
8 Could an upstream update silently break it? Yes for C and D1. No for A. High 4.5, 4.6
9 Can the existing queue take these warnings without structural change? Yes High enqueue unchanged; gaps are a label, a key, and a header
10 Is automatic ingestion reliable enough to justify it over manual forwarding? Not now Medium-high Q1, Q7, Q8; off by default and first-party only (1.1, 1.8)

Risks and unknowns

Confirmed limitations

Unverified assumptions

Validation plan

Each experiment is read-only toward Claude Code configuration. None of them was run, because each needs a live session or a model turn.

ID Question Procedure Expected evidence Cost
E1 Does a user-tier mod see the built-in mod’s calls? (decides D1) Write a throwaway mod with pass-through hooks on store.set and model.fork (return next(e)). Log only event names, next.origin, key names, value shape, string lengths, and a sha256 of view.line to a local file. Load it with claude --plugin-dir ./probe in a normal session with the feature on. Work until one note shows. Compare the logged hash with the sha256 of the shown line. origin.plugin names the built-in mod, tier: builtin; one store.set whose view.kind is offer and whose line hash matches No extra model calls by the probe. The feature’s own checks bill as usual (1.7). About one working session.
E2 Is the payload stable? Repeat the E1 capture on the next two or three Claude Code releases and diff the key sets The same keys, or a list of the changes As E1, per release
E3 Does ! dotbabel peer status in a paired Main resolve identity? Type it in a paired Main terminal The pair ID, not no unique pair None
E4 What does “Chat in main session” insert? A temporary UserPromptSubmit hook that logs only whether the prompt starts with a fixed prefix, and its length A stable prefix One main-agent turn

Promotion rule: consider D1 only if E1 passes and E2 shows no change across two releases. Even then, ship it as confirm mode, off by default, gated on measured versions like VERIFIED_CLAUDE_MAIN_VERSIONS.

Decision

MANUAL FIRST.

Implementation scope, if approved

Smallest change set, in one pull request:

  1. dotbabel peer heads-up [--pair ID] [--tag TAG] TEXT in P/cli.mjs. It normalizes the text, derives dedupe = hu-<16 hex>, writes the data label and the provenance header into the body, and calls the existing enqueue with forward: actionable. It joins the EXTERNAL set, as ask does. No ledger schema change.
  2. Label every request body in next output, in the context built at P/cli.mjs:210-216. This closes the general gap.
  3. Skill text (skills/peer/SKILL.md, version bump, regenerated template and example consumer):
    • A Main intent row “Forward a Heads Up to the Advisor → dotbabel peer heads-up”.
    • An Advisor procedure: verify, classify, complete, and send a finding only when actionable.
    • Natural-language routing for “send this heads up to the advisor”.

Anticipated tests:

Acceptance criteria:

An implementation prompt is not written here. Write it only after the owner approves this scope.

Decision update (2026-10-23)

Decision: CONDITIONAL GO for option C, the store-file watcher, as an opt-in part of the existing relay. It is off by default (peer.heads_up.mode: "enqueue" in .dotbabel.json). Code: plugins/dotbabel/src/peer/heads-up-store.mjs; the relay calls it from tick (plugins/dotbabel/src/peer/relay.mjs). The original objections to C stay true. The watcher answers each of them with a gate that fails closed:

Objection to C (from the options table) Gate Met?
The schema is undocumented A strict shape check: any other key, type, tag, or view shape gives unknown_format and forwards nothing Yes. Unit tests cover each refusal.
Any schema change breaks it silently Measured versions only (2.1.307, 2.1.309), from claude --version and Main’s registry entry. Another version gives unsupported_version. Yes, for these two versions. Each new release needs a re-measure before it joins the list.
The format on 2.1.309 Re-measured on 2026-10-23 (key names and value types only): the same top-level keys, record key sets, and view shape as finding 3.3 and 3.4 Yes. The open offer’s line was the last seen entry, which matches the order seen first, then the session record.
The view is overwritten in place Open offers are read each second. A note that closed between reads is attributed only when one session changed; two or more count as ambiguous Yes. Unit tests and a real relay process test.
mtime changes on read The watcher never uses mtime. It compares snapshots. Yes
Notes from other sessions Only claude:<sessions[].id> equal to the pair’s Main key is forwarded Yes. Unit tests.
Replay after a restart A baseline at relay start, plus the content dedupe of enqueueHeadsUp Yes. Unit tests.
Consent per note None. The project opt-in replaces it. The docs state that note text reaches the Advisor, possibly on another provider. Accepted by the opt-in
A real note forwarded end to end (live) One real note in a real Main, queued once, with a matching line hash Not met (unverified). On 2026-10-23 a real pair on 2.1.309 ran with the watcher watching for about 22 minutes and six tasks. The add-on wrote no store record for either session (no check ran), so no note could appear. The cause is not known (H). The off path was shown live.

Until the live row passes, the watcher stays opt-in and experimental. The watcher reads no transcript, writes no Claude Code file, and makes no model call. Its forwarded set and snapshot live in the relay’s memory. Only its status fields go to the pair record.