session-flow: observer mod with live checks and session-start catch-up, replacing the detached observer
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 22/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- developer-experience, tooling
Rechercherichtung
Start with the mod docs linked in the issue and the existing plugins/session-flow layout, then read observer.py and the observer-arm.sh SessionStart arm that the change retires. The first concrete step is the probe in the acceptance criteria: whether a child started via $.process.run outlives the session, recorded with the Claude Code version. Done means the live-check triggers, ledger writes, band delivery, catch-up, and observer removal all land in one PR with tests for the trigger, stale-reply and backoff behavior — far beyond a first contribution.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
User story
As the owner, I want every Claude Code session watched for process mistakes while it runs, with findings written to the running-retro ledger and offered to me above the prompt, so retro and /corrections:codify happen without me remembering to run them, and without a long-lived background process polling the transcript.
Decisions (owner, 2026-11-24, "go w/ recommendations")
- Q1, what runs: a session-flow mod with live checks that write findings to the ledger as they happen, plus a catch-up at the next session's start that runs the existing post-session analysis only for sessions that got no live checks (headless
-planes, short sessions). The detached observer (observer.pytailer, 5 s polls, up to 24 h per session, 15 min idle end) is retired in the same change, per ADR 0052 "one implementation of a behavior at a time". - Q2, when it checks: on the model-step trigger the built-in side agent uses (every 6th model step within a turn, step index above 0), plus one check at the end of each turn that ran tools.
- The built-in side agent (
cc-plugin-you-should-know) stays on; ours serves a different purpose and must not repeat its notes.
Design inputs
- Mechanism to model, read from the mods docs (https://code.claude.com/docs/en/plugins/mods/overview and its reference, api, events and interface pages) and from the built-in side agent's design as shipped in Claude Code 2.1.331 (study only; it is Anthropic's proprietary code, copy none of it):
- trigger on
turn.step(andturn.completefor the end-of-turn check), one check in flight per session, a reply that arrives after the turn moved on is dropped; - the check is
$.model.forkwith a prompt only: it reuses the main thread's cached request, has no tools, and writes nothing to the transcript; - the reply defaults to "none" in labeled lines, parsed leniently with a length cap;
- repeats suppressed through a
$.store-backed seen list injected into the prompt plus a normalized match; - backoff after findings the person ignores; any answer resets it;
- delivery is an above-prompt band with digit hotkeys; "send to main session" uses
$.prompt.fill; nothing reaches the main context unless sent.
- trigger on
- Differences for our purpose: a closed category list (process mistake, regression against an owner decision, skipped verification, instruction drift), each finding written to the running-retro ledger with session, turn, step, category and the rule it cites; the prompt reads the owner-decision sources the repo names; findings persist off-context.
- Catch-up:
session.startlists ended sessions with no ledger and no live checks (a$.storeset of handled session ids, an atomic lock in the launched process since$.storeget/set is not atomic), honorsobserver_min_lines, and starts the analysis through$.process.runof a detaching launcher. Probe first whether a child started that way outlives the session; if not, the catch-up runs in the next session's lifetime. - Recursion guard: mods load in
claude -p, so the catch-up's analysis run must not re-trigger the mod (an env marker). - Cost: every live check bills the session's account with no per-call cap; record each check's usage (as #18951 does for the post-session run) so a day's cost can be read.
Acceptance criteria
- Probe recorded: does a process started by
$.process.runfrom a mod outlive the session (yes/no, Claude Code version). - Live check fires on every 6th model step of a turn and at the end of a tool-using turn, never twice at once, and drops stale replies; tests prove each.
- A finding appears in the band and in the running-retro ledger; "send to main session" fills the prompt; nothing enters the main context otherwise.
- Repeats across sessions are suppressed; ignored findings back off.
- Catch-up analyzes an ended session that had no live checks and skips one that had them or is under
observer_min_lines. - The detached observer path (
observer-arm.shSessionStart arm,observer.pytailer) is removed in the same PR, with docs andobserver_*options migrated or retired. - Each live check's usage is recorded.
- Cost measured before defaults: the end-of-turn trigger fires on most turns of a working session (most turns use tools), close to a check every turn. Ship both triggers as settings; measure per-check usage and checks per hour on one real working session with both on; turn the end-of-turn trigger on by default only if that cost is acceptable to the owner, otherwise default it off (the step trigger alone matches the built-in side agent).
Affected area / component
plugins/session-flow (new mod; running-retro, observer reference, hooks), ADR 0052 conformance.
- Vorherrschende Sprache
- Shell
- Sterne
- 22
- Forks
- 2
- Ø Merge
- 2 Std.
- Gemergte PRs (30 T.)
- 960
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus melodic-software/claude-code-plugins
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
melodic-software/claude-code-plugins#19225 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
melodic-software/claude-code-plugins#17779 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
recurring
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
melodic-software/claude-code-plugins#19274 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
melodic-software/claude-code-plugins#19270 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 53/100
melodic-software/claude-code-plugins#19269 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in melodic-software/claude-code-plugins
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nais/attest-sign#139 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
community-scripts/core#303 ·
Maintainer antworten meist innerhalb von 1 Tag
-
severity: low
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
luainkernel/lunatik#2727 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[quality] release publish.mjs integrity guards have no unit testEvtl. vergeben @robarnold hat das heute übernommen. Offenagent/quality stage/040-covered-by-pr testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
marinatedconcrete/config#1155 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug report-to-upstream
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
flatpark/flatpark#1585 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag