Skip to content

[plan-18] Observer Response Pipeline — classify every output, never confirm a batch on failure, bound every history #3606

Open

Description

@thedotmack

[plan-18] Observer Response Pipeline — classify every output, never confirm a batch on failure, bound every history

Tracker: #3606 · Design doc: plans/18-observer-response-pipeline.md · Series: plan-14 #3602 · plan-15 #3603 · plan-16 #3604 · plan-17 #3605 · plan-18 #3606 · plan-19 #3607 · plan-20 #3608 · plan-21 #3609 · plan-22 #3610 · plan-23 #3611

Defect

ResponseProcessor has effectively one bucket for "the model did not return well-formed <observation>/<summary>/<skip_summary/> XML", and that bucket confirms the claimed batch (confirmClaimedMessages()) — so every non-XML reply is silent data loss, and the pipeline's countermeasures are either dead or self-defeating:

  • Skip contract mismatch: modes/*.json skip_guidance says "return an empty response"; the parser accepts only <skip_summary reason=…/>; empty → idle, "no observations to record" → prose. Both were counted toward consecutiveInvalidOutputs >= 3 → "SDK session poisoned — killing and respawning" (hundreds of respawns/day, conversationHistory wiped, batches never redelivered). 13.11.0 removed the escalation but left the counter assigned 0 at five sites and never incremented, and left the silent drop.
  • Auth failures (Failed to authenticate 403/401, Not logged in), model errors (There's an issue with the selected model), transport errors (Connection closed mid-response), context overflow (Prompt is too long arriving as assistant text, not a throw), XML schema drift (<kind>/<detail> instead of <type>/<title>), and closed <observation> blocks with prose but no fields are all classified prose/xml and dropped; only quota and (recently) auth have preserve-work branches; the malformed turn is pushed into conversationHistory before validation so drift self-reinforces for the rest of the session.
  • Empty requests: the generator auto-starts with queueDepth=0, sends an empty INIT turn, gets "" back, and bins already-claimed messages; SessionManager discards the stored memory_session_id whenever the session is absent from the in-memory map ("Issue [Bug] Stale session fix incomplete: lastPromptNumber loaded from DB bypasses resume guard #817") even when the worker never restarted, so a 180 s idle eviction sends the next batch back through INIT where the model's reply consumes it.
  • No token budget anywhere: session.conversationHistory is push-only (ClaudeProvider.ts:490/528/552, OpenAICompatibleProvider.ts:105/215/265, ResponseProcessor.ts:294) and fix(providers): remove client-side context truncation ("second system") #3096 removed the OpenAI-compatible truncateHistory(); the OpenRouter copy that remains returns [] when a single message exceeds MAX_TOKENS (400 from the API, observation marked failed); the OpenAI-compatible provider appends each assistant reply twice; max_tokens: 4096 is hardcoded and finish_reason=length is never logged (76 % of responses truncated, trailing block lost, degenerate repetition hidden by content_hash); base64/image payloads and unbounded per-field tool output go straight into the prompt; the paused-for-auth buffer (buffers=new Map, removed only by confirm()) grows to GBs; ~10× token amplification is billed to the user's subscription at DEBUG log level.
  • Output quality is unenforced: the type enum is logged as invalid then stored verbatim (or defaulted to bugfix); write-time dedup is byte-identical content_hash only, so paraphrased restatements flood the recall window; reasoning models' legitimately empty content with reasoning_content is treated as an init failure; provider settings are validated for all providers regardless of the active one so a retired Gemini id blocks every settings save.

The fix is one explicit classifier with one policy table: every output class maps to {preserve batch | confirm batch | abort session with reason}, and every history/buffer/response has a budget.

Children

Related PRs to evaluate/rebase: #3460 (transport-error classifier), #2957 (SDKAgent sliding window), #2884, #2943, #2927, #2857, #2905, #1775 (prose salvage), #3352 (prompt: check prior output), #3207 (auth-prose preserve batch), #3283 (retired model ids).

Fix sequence

  1. One classifier, one policy table. sdk/output-classifier.ts returns a closed enum — valid, skip, empty_request, idle, auth, quota, model_error, transport, overflow, xml_drift, prose_salvageable, prose — and ResponseProcessor dispatches through a table: preserve batch (resetProcessingToPending) for empty_request|idle|auth|quota|transport|overflow|xml_drift, confirm for valid|skip, salvage-then-confirm for prose_salvageable (title = first 100 chars, narrative = text, WARN), confirm-with-ERROR for true prose. Nothing reaches conversationHistory before it passes validation; xml_drift pops the bad turn and re-sends the schema. consecutiveInvalidOutputs either counts and aborts with a typed abortReason (drift:*, overflow:*) after 3 or is deleted — not assigned 0 and logged.
  2. Skip is a sentinel, not silence. Every mode's skip_guidance emits <skip_summary reason="…"/> (and <skip_observation/> for observation turns); the parser accepts both; the generator never sends a turn with queueDepth=0; the INIT prompt is only sent when bootId changed (plan-15 owner record) — a stored memory_session_id is resumed on the same worker instance instead of being discarded on idle eviction.
  3. Token budget as a first-class object. ObserverBudget {maxHistoryTokens (fraction of model context), maxFieldChars, maxToolOutputChars, maxOutputTokens} shared by all providers; history is trimmed (compact older half → summary) never emptied (truncateHistory keeps ≥ 1 message and truncates content instead); the duplicate append is removed; base64/image blobs replaced with [image omitted: type, N KB] at ingest; max_tokens configurable and coupled to CLAUDE_MEM_API_TIMEOUT_MS; finish_reason=length and repeated obsIds logged WARN; cumulative input/output tokens logged INFO and exposed on /api/health + statusline; the auth-paused buffer is capped with spill-to-disk and stops accepting past the cap.
  4. Provider adapter parity. One OpenAICompatibleProvider config surface: base URL, max_tokens, reasoning: {effort} (only when advertised), empty-content-with-reasoning_content treated as no-op, SettingsRoutes validates only the active provider's fields and normalizes retired ids at load; the viewer save handler surfaces the JSON error body; installer/Settings UI expose the base URL.
  5. Output quality gates. Unknown type → coerced to a neutral type with the raw value in metadata (enum restated in the per-tool-use template); missing title rejected; write-time (title, project) normalized dedup with occurrence_count (opt-in fuzzy tier review-only); CLAUDE_MEM_SKIP_BASH_PATTERNS at the same gate as SKIP_TOOLS; a "check your prior output" line in the observation prompt.

Test matrix

Provider Output Required behavior
claude (SDK), openrouter, gemini, openai-compatible "" on empty request class empty_request; batch preserved; no INIT churn; no log spam
all <skip_summary reason=…/> / <skip_observation/> confirmed; zero ERROR lines
all "No observations to record" prose class idle; batch preserved; counter untouched
all 401/403/Not logged in/OAuth session expired text class auth; batch preserved; session paused with ERROR + health flag
claude Prompt is too long as text class overflow; batch preserved; history reset; retried once with budget halved
all <observation><kind>… drift class xml_drift; turn popped; schema resent; abort after 3 with drift:observer_schema
all closed <observation> with 1,000 chars prose salvaged as narrative; WARN
all type=verification (not in enum) stored as neutral type + metadata; never bugfix by default
openrouter one message > MAX_TOKENS request still has ≥ 1 message; content truncated; no 400
openai-compatible 200 turns history tokens ≤ budget; each assistant reply present exactly once
openrouter/gemini finish_reason=length WARN logged; partial block salvaged; no blind retry
all 50 h paused for auth buffer ≤ cap; heap flat; observations drain after /login
all model returns paraphrase of previous title dedup increments occurrence_count, no new row
claude, gemini settings save with retired gemini id while provider=claude 200; id normalized

The matrix lives in CI (tests/sdk/output-classifier.test.ts + tests/services/worker/ResponseProcessor.test.ts with recorded provider transcripts). A regression must fail CI before a user can file.

Out of scope

How the observer subprocess is spawned, authenticated, isolated, and where its transcripts live (plan-19). Which project an observation is filed under (plan-20). Queue/session state persistence and retry (plan-21).

Activity

  1. thedotmack commented on Aug 17, 2026

    @thedotmack
    OwnerAuthor

    PR consolidation pass — open pull requests routed to plan-18

    Every open PR in the repo (201 as of 2026-08-16) was read in full — body, review threads, files changed, and diffed against origin/main — and clustered by the root cause it targets. These are the PRs whose fix belongs to [plan-18] Observer Response Pipeline. Sequencing lives here; the design lives in plans/18-*.md on the oh-my-issues branch (#3617).

    11 bundle candidate · 6 standalone · 10 needs rework · 1 superseded

    Bundle candidates — sound fixes to fold into this plan's bundle PR (with author credit), keyed to the fix-sequence step they implement:

    Standalone / merge-now — small, self-contained; can land ahead of the bundle:

    Needs rework — right diagnosis, blocked on the item noted (address it against the plan doc, or it gets absorbed into the bundle):

    Superseded — closed in this pass (fix already on main or landed via another PR):

    Next step for this plan: cut the bundle PR from the bundle candidates in fix-sequence order (Mode 3 of oh-my-issues), listing each folded PR with Closes #N/co-author credit; merge the standalone PRs independently once CI is green; leave needs-rework PRs open until their blocker is addressed or the bundle covers them.

    Generated by the /oh-my-issues PR pass; verdicts are the pass's reading of the review threads, not a maintainer decision.

  2. ntdatt812 commented on Aug 18, 2026

    @ntdatt812
    Contributor

    Reading the consolidation pass — 201 PRs read in full, diffed against origin/main, and clustered by root cause. That's the part of this repo that gets harder every time someone like me sends another PR.

    I did a narrow version of it for plan-18 before sending anything. The children listed here are closed as tracked, not as fixed, so I checked which defects are still live at HEAD instead of assuming. Two were:

    Both ship with tests that fail on main. On #3620 the reviewer caught two real defects in my own diagnostic — a capped summary reply reported as a truncated observation, and missing upstream usage rendered as outputTokens: 0 — and I pushed fixes and tests for both the same day.

    If it's useful, I'd like to do that verification pass for the other trackers — one plan issue at a time: check each listed child against HEAD, mark which are already fixed, which are still live, and which open PRs actually cover them. I'd post it as a comment for you to accept or discard.

    Triage only — no merge rights, no write access, nothing lands without you. If applying a needs-rework / superseded label would save you a step I'd use it, but a comment works fine.

    Easy to say no; the oh-my-issues pass in #3617 may already cover this. If it isn't covered — which tracker is most in the way right now?

  3. rolldav commented on Aug 19, 2026

    @rolldav

    Additional 13.15.2 evidence: interactive and print-mode capture diverge after non-XML observer replies

    Environment

    • claude-mem 13.15.2, release tag commit b0194042d53e618f1eb85a2bdf1f61456f3f49da
    • Public main inspected at fae697a45d107aae567d605916391ab64d8ecae1
    • Claude Code 2.1.235, macOS on Apple Silicon
    • Worker healthy and MCP-ready; Claude subscription provider; pre-existing healthy SQLite database

    Expected

    With the same small Read event successfully delivered through PostToolUse, interactive and print-mode invocations should have the same documented capture semantics, or the unsupported lifecycle difference should be documented.

    Actual, anonymized local evidence

    In one controlled interactive session in a fresh directory:

    1. Claude Code used Read on a tiny benign file.
    2. The worker logged PostToolUse: Read and queued an observation batch.
    3. The first observer reply was No observations to record at this time.
    4. End-of-session processing was then queued.
    5. Later, under the same anonymized memory session, one XML observation and then one XML summary were persisted, and the session completed.

    In multiple earlier print-mode/one-shot probes, a session was created and PostToolUse: Read was logged, but the observer returned either refusal-style prose or an empty/non-XML response; those anonymized sessions persisted zero observations.

    Minimal comparison

    1. In a fresh directory, create a tiny non-sensitive ORACLE.md.
    2. Run an interactive claude session, explicitly request a Read, then exit normally.
    3. Repeat through Claude Code print mode (claude -p ...).
    4. For each content session, compare PostToolUse, queue state, observer response and Stop/end-of-session with the persisted observation row.

    The current prompt permits an empty response and says non-XML output is discarded; the current processor then confirms claimed messages after ordinary non-XML output:

    • return `<observed_from_primary_session>
      <what_happened>${obs.tool_name}</what_happened>
      <occurred_at>${new Date(obs.created_at_epoch).toISOString()}</occurred_at>${obs.cwd ? `\n <working_directory>${obs.cwd}</working_directory>` : ''}
      <parameters>${truncateObservationField(toolInput)}</parameters>
      <outcome>${truncateObservationField(toolOutput)}</outcome>
      </observed_from_primary_session>
      If a <parameters> or <outcome> block above contains an "<elided chars=... />" marker, that field was truncated to fit the observer's context window. Describe only what you can see in the kept portion and do not infer details about the elided range.
      Return either one or more <observation>...</observation> blocks, or an empty response if this tool use should be skipped.
      Concrete debugging findings from logs, queue state, database rows, session routing, or code-path inspection count as durable discoveries and should be recorded.
      Never reply with prose such as "Skipping", "No substantive tool executions", or any explanation outside XML. Non-XML text is discarded.`;
    • // Classify the non-XML output so a dropped batch is visible, not silent.
      // Ordinary idle/prose is a claimed no-op batch: confirm it and do not build
      // any respawn debt from repeated skip acknowledgements.
      const outputClass = classifyObserverOutput(text);
      const preview = previewOutput(text);
      session.consecutiveInvalidOutputs = 0;
      logger.warn('PARSER', `${agentName} returned non-XML ${outputClass} response — ignoring queued batch`, {
      sessionId: session.sessionDbId,
      outputClass,
      preview,
      consecutiveInvalidOutputs: session.consecutiveInvalidOutputs,
      });
      // Plain-text skip responses are intentionally ignored. Re-queueing them
      // creates an observer loop where the same low-signal batch is retried.
      await sessionManager.confirmClaimedMessages(session.sessionDbId);
      session.earliestPendingTimestamp = null;
      return;

    Question / limits

    Could maintainers confirm whether print mode is expected to run the same Stop/end-of-session drain semantics as an interactive session, and whether the later XML observation can belong to the earlier claimed batch after summarize is queued?

    This sample shows correlation, not a proven concurrency root cause. It does not prove a general Claude Code 2.1.235 incompatibility, a system-prompt cause, or that every non-XML reply should be requeued. Paths, prompts, contents, UUIDs, database identifiers, PIDs and corpus counts are redacted. No downgrade, cache edit, wrapper, database merge or configuration change was used.

  4. rodboev commented on Aug 20, 2026

    @rodboev
    Contributor

    Opus 5, is that you?

  5. raka08 commented on Aug 20, 2026

    @raka08

    Independent confirmation on 13.15.2 — the drift is ongoing 4 days after consolidation

    Corroborating #3592 (consolidated here) from a separate install. Same symptom, newer version, and the rate has not slowed.

    Environment: claude-mem 13.15.2, macOS 15.6 (arm64), plugin install, CLAUDE_MEM_RUNTIME=worker, stock code mode (the 9-entry enum), provider claude / claude-haiku-4-5-20251001. Store: 9,652 observations.

    Current state

    out-of-enum observations 302 of 9,652 (3.1%)
    distinct invalid types 160
    rows carrying metadata.original_type 0

    The last row matters: this install has never been remapped, so all 302 are original drift rather than leftovers from a cleanup.

    Drift after #3592 was closed (2026-08-16)

    date rows distinct new types
    2026-08-16 79 79
    2026-08-17 6 6
    2026-08-18 98 22
    2026-08-19 50 42
    2026-08-20 53 16

    286 of the 302 landed on or after the consolidation date.

    Log counts over the last 3 days

    355  [ERROR] [PARSER] Observation missing type field, using "bugfix"
     73  [ERROR] [PARSER] Invalid observation type: progress, preserving emitted type
      3  [ERROR] [PARSER] Invalid observation type: debug, preserving emitted type
      2  [ERROR] [PARSER] Invalid observation type: verification, preserving emitted type
      2  [ERROR] [PARSER] Invalid observation type: problem-solution, preserving emitted type
      2  [ERROR] [PARSER] Invalid observation type: collaboration_message, preserving emitted type
      2  [ERROR] [PARSER] Invalid observation type: checkpoint_update, preserving emitted type
    

    Both branches described in #3592 are firing on this install — the missing-<type> branch far more often than the out-of-enum branch.

    What the emitted types actually look like

    Most are not near-miss synonyms such as progress or debug. They are content-derived slugs, which suggests the observer is treating <type> as a free-text label rather than a closed enum:

    apiowner-tiktok-batch-5-67percent
    instagram-dual-window-batch-3-sustained-performance
    bulkfollows-youtube-delivery-billing-final
    wave-1-system-fully-locked
    smmturk-ticket-290124-verification-final
    

    Downstream effect worth noting

    The session-start context header renders a fixed legend for the 9 enum types. Rows carrying one of the 160 drifted types render without a symbol, and any grouping or filtering on type silently misses them.

    The missing-<type> branch also inflates bugfix specifically, since that is the enum's first entry and therefore the default: 703 rows currently carry it, while 355 of the 3-day error lines come from that branch alone.

    Happy to supply the full 160-value list or per-day breakdowns if that would help sequencing.

  6. ntdatt812 commented on Aug 20, 2026

    @ntdatt812
    Contributor

    @raka08's two log branches are exactly the two branches #3593 pins, so the field data and the test coverage line up one-to-one:

    log line, last 3 days test in #3593
    355× Observation missing type field, using "bugfix" falls back to the first declared type when <type> is absent
    73× + 11× Invalid observation type: …, preserving emitted type preserves a type that is outside the enum

    One thing worth making explicit, because the log line reads as if it were a decision: the bugfix in those 355 lines is not a chosen default. It is observation_types[0] — whatever happens to be first in the active mode's enum. In the bundled code mode that is bugfix, so every untyped observation is filed as a bug fix by list order rather than by classification. Reordering the enum silently reclassifies all of them, which is why #3593 has a third case that reorders the enum and asserts the fallback follows it to refactor.

    On this install that is 355 log events in three days landing in one bucket that nothing chose.

    What #3593 does not do, to be clear about scope: it is characterization only. It does not enforce the enum and does not stop the drift — it pins today's behaviour so that whichever way enforcement eventually lands, it shows up as an intentional test edit rather than as silent movement. @raka08's numbers are the argument for doing that enforcement; the tests are only the seatbelt for when it happens.

    The observation that most drifted types are content-derived slugs rather than near-miss synonyms —

    apiowner-tiktok-batch-5-67percent
    instagram-dual-window-batch-3-sustained-performance
    wave-1-system-fully-locked
    

    — is the more interesting half, and it is upstream of the parser. Those are not a parser failing to validate a plausible type; they are the observer treating <type> as a free-text label. 160 distinct invalid types out of 302 rows is close to one new type per two rows, which is what a free-text field looks like, not a mistyped enum. Fixing that is a prompt/contract question rather than a parse-site one, and #3593 deliberately does not touch it.

    Status on my side: #3593 is not waiting on review. Its workflow runs terminate at conclusion=action_required — the first-time-contributor approval gate — so CI has never actually run on it. Detail and the affected-PR list are in my comment on the PR. Locally on the current rebased head: npm run typecheck exit 0, bun test ./tests/sdk/parser.test.ts 24 pass / 0 fail.

  7. raka08 commented on Aug 22, 2026

    @raka08

    Field data on the "classify every output / never confirm a batch on failure" half of this plan — 13.15.3, 6,652 discarded batches in 13 days

    Following up my earlier comment on the type-drift half. This install now runs 13.15.3 (macOS 26.6.2, arm64, plugin install, CLAUDE_MEM_RUNTIME=worker, provider claude behind an ANTHROPIC_BASE_URL gateway). Store: 11,198 observations. This is the discard side, which #3351 and #3461 were both consolidated here for.

    Every discard classification, retained logs 2026-08-10 → 2026-08-22

    outputClass discarded batches
    idle 4,176
    prose 1,982
    xml 494
    total 6,652

    All 6,652 log the same terminal line — SDK returned non-XML <class> response — ignoring queued batch — and the batch is dropped with no retry, no dead-letter, no salvage.

    The xml class is the interesting one

    outputClass=xml means the classifier already decided the payload is XML, and the strict parser then rejected it anyway. Breaking those 494 down by the shape of the payload the observer actually returned:

    payload shape count salvageable?
    <observation> + prose body, no <type> child 242 yes — this is exactly #3351's shape
    not XML at all (refusal text, echoed prompt, or a ```xml markdown fence around otherwise valid XML) 132 partly — the fenced ones are a one-line strip
    <observation> <type>…</type> <title>… — the expected child form 69 should never have been rejected
    <observation type="discovery"> — attribute form instead of child elements 38 yes — schema drift, #3461's shape
    <observation></observation> — empty element 9 no, but should be counted, not silently dropped
    <summary>… 4 yes

    484 of the 494 carried substantive content (the log's own (+N chars) marker), i.e. the discarded payloads were not empty responses — they were written observations that were thrown away.

    Two shapes deserve calling out specifically:

    • 69 payloads in the canonical child form were still discarded. Sample preview: <observation> <type>bugfix</type> <title>Confirmed: no darwin-arm64 tree-sitter prebuild and no wasm fallback</title> <subtitle>…(+1254 chars). A payload that opens correctly and carries 1.3 KB of body is not a classification problem — the strict parse is failing on something downstream of the opening element. A few others in this bucket are genuinely truncated mid-<title> with no (+N chars) marker, so the bucket is mixed, but not all of it is truncation.
    • A markdown code fence is enough to lose a batch. Sample: preview=```xml <observation> <event>…</event> <timestamp>…</timestamp> …. Nothing is wrong with that XML except the three backticks in front of it.

    Per-day volume, and what it costs

    date xml-class discards observations written
    2026-08-14 25 1,139
    2026-08-16 83 702
    2026-08-17 46 1,108
    2026-08-18 304 993
    2026-08-20 28 674
    2026-08-21 8 1,276

    On 2026-08-18 the xml-class discards alone were ~31% of that day's written observations — and that is before the 1,982 prose and 4,176 idle discards.

    consecutiveInvalidOutputs is still dead on 13.15.3

    Every one of the 6,652 discard lines carries consecutiveInvalidOutputs=0:

    $ grep -hE '\[WARN \] \[PARSER\].*SDK returned non-XML' ~/.claude-mem/logs/*.log \
        | grep -ho 'consecutiveInvalidOutputs=[0-9]*' | sort | uniq -c
    6652 consecutiveInvalidOutputs=0
    

    Not one increment across 13 days and 6,652 invalid outputs. Whatever escalation this plan hangs off that counter (#3454's finding, consolidated here) will never fire while the counter is reset on every pass. Worth treating as a precondition for the rest of the sequence rather than a separate step — the "never confirm a batch on failure" work is unverifiable in the field until the counter that records failure actually counts.

    Smallest changes that would recover the most, from this data set

    1. Strip ``` / ```xml fences before parsing — free, and it is currently a total-loss condition.
    2. Accept <observation type="…"> as equivalent to <observation><type>…</type> — 38 batches here.
    3. Salvage <observation> with a prose body by filing it under the mode's fallback type and recording the degradation, rather than discarding — 242 batches here. (Note the interaction with the type-drift half of this plan: observation_types[0] as the fallback is what @ntdatt812 flagged above, so the salvage path needs an explicit unclassified type rather than list order.)
    4. Fix the counter, then dead-letter anything still unparseable so the loss is measurable instead of a log line.

    Happy to pull any further slices from this install's logs or DB if a specific shape would help the fix sequencing.

  8. ntdatt812 commented on Aug 22, 2026

    @ntdatt812
    Contributor

    @raka08 — on point 3, the interaction is worse than list order, and the reason is one line further down the pipeline than either of us was looking.

    Where the fallback comes from (src/sdk/parser.ts:106-116, HEAD e2d1df5):

    const validTypes = mode.observation_types.map(t => t.id);
    const fallbackType = validTypes[0];
    let finalType = fallbackType;
    if (type) {
      finalType = type;
      if (!validTypes.includes(type)) {
        logger.error('PARSER', `Invalid observation type: ${type}, preserving emitted type`, …);
      }
    } else {
      logger.error('PARSER', `Observation missing type field, using "${fallbackType}"`, …);
    }

    Four distinct enums ship, and bugfix is only the first element of one of them:

    mode observation_types[0] — what an untyped observation becomes
    code (and all 32 localized code--*, which deep-merge the parent's enum) bugfix
    entity/investigation entity
    legal case-holding
    crypto pump-detected

    So in the legal mode an untyped observation is filed as a case holding, and in the crypto mode as a detected pump. Same line, no classification anywhere in it.

    The part that changes the fix. The two branches look symmetric — one replaces the type, the other preserves it — but preserving an out-of-enum type is not a safe pass-through. The column has no constraint (type TEXT NOT NULL, SessionStore.ts:957), so the row is written; then the context query filters on the active mode's enum:

    src/services/context/ContextConfigLoader.ts:11   new Set(mode.observation_types.map(t => t.id))
    src/services/context/ObservationCompiler.ts:26   Array.from(config.observationTypes)
    …/ObservationCompiler.ts (query)                 AND type IN (${typePlaceholders})
    

    An observation whose type is not in that set is stored and then never injected. Your 73× + 11× preserving emitted type lines are not observations that survived with an odd label — they are observations that are in the database and invisible to every context load.

    Which is the constraint on unclassified. Introducing it as the salvage type for those 242 <observation>-with-prose-body payloads recovers them from the discard log into exactly that invisible bucket, unless unclassified is declared in each mode's observation_types. Declaring it is not free either — the same list drives the type legend in AgentFormatter/HumanFormatter and the <type>[ a | b | c ] line the observer prompt is built from (src/sdk/prompts.ts:28), so adding it also offers it to the model as a choice. Worth deciding deliberately rather than as a side effect: a salvage-only id the prompt does not advertise needs the enum split into "accepted on read" and "offered on write", which is one list today.

    For scope, since it sits next to this: #3593 is characterization only. It pins the current behaviour of both branches — including a case that reorders the enum and asserts the fallback follows it to refactor — so that a change here is visible as a diff instead of arriving silently. It does not enforce the enum and does not fix the invisibility above; that belongs to whatever step of this plan takes the salvage path.

  9. raka08 commented on Aug 23, 2026

    @raka08

    The 538 discarded batches, classified by output shape — and one of them is a proven two-regex asymmetry

    Following up my 13-day batch-discard comment above with the classification this plan's first bullet ("classify every output") actually needs. Same install, 13.15.3, macOS 25.6.0 (arm64), plugin install, CLAUDE_MEM_RUNTIME=worker, mode code, retained logs 2026-08-14 → 2026-08-23.

    I took every timestamp-anchored SDK returned non-XML xml response — ignoring queued batch line (n=538) and bucketed it by the shape of its own preview= field, then cross-referenced whether the parser logged any per-observation diagnostic (Skipping empty observation) in the preceding lines — i.e. whether parseObservations extracted a block at all.

    output shape n % extracted then skipped nothing extracted, zero diagnostics
    <observation><what_happened> (echo of the input wrapper) 120 22.3% 46 74
    <observation><type>… — the canonical child form 100 18.6% 52 48
    <observation type="…"> — type as an attribute 89 16.5% 0 89
    ```xml markdown fence 76 14.1% 76 0
    <observation> other/prose body 142 26.4% 139 3
    genuinely non-observation (prose, one injection refusal) 11 2.0% 2 9

    Only 11 of 538 (2.0%) were correctly discarded. The other 98% carried substantive observation content — the (+N chars) markers on these lines run to +3748 on a single batch.

    1. The attribute form is a detector/extractor asymmetry — 89/89, no diagnostics

    This one is not a model-behaviour problem, it is two regexes in the shipped bundle disagreeing about what an observation tag looks like.

    Detection (validateResponse) accepts attributes, because of \b:

    let n = /<(observation|summary)\b/i.exec(t);
    if (!n) return { valid: false };
    if (n[1].toLowerCase() === "observation") {
      let o = parseObservations(t, e);
      return o.length === 0 ? { valid: false } : { valid: true, observations: o, summary: null };
    }

    Extraction (parseObservations) requires the bare tag, no attributes:

    let n = /<observation>([\s\S]*?)<\/observation>/g;

    So <observation type="discovery">…</observation> is classified outputClass=xml, routed into parseObservations, matches nothing, returns [], and the batch is dropped through the o.length === 0 → {valid:false} arm. No Skipping empty observation, no Observation missing type field — nothing is logged about the observation at all, which is exactly why this shape has never shown up in the counters anyone has been quoting. The 89/89 correlation in the table is the whole bucket.

    Sample preview, verbatim from the log:

    preview=<observation type="discovery"> Primary session … established a new reusable chunked-pagination
    pattern for order-status lookups exceeding the ~100-ID query-s…(+N chars), consecutiveInvalidOutputs=0
    

    Relaxing the extractor to /<observation\b[^>]*>([\s\S]*?)<\/observation>/g and reading type from the attribute when the child element is absent recovers all 89 — and, more to the point, makes the two regexes agree, which is what stops this bucket from silently reappearing.

    The same asymmetry explains why parseObservations returning [] is indistinguishable from "the model said nothing useful": both land on {valid:false}. A one-line logger.warn('PARSER', 'observation tag detected but no block extracted', {…}) on that arm would have surfaced 223 of these 538 batches on day one.

    2. <what_happened> is the observer echoing the prompt's own input vocabulary

    The largest bucket is not invented drift. The tool event handed to the observer is wrapped like this (same bundle):

    return `<observed_from_primary_session>
      <what_happened>${t.tool_name}</what_happened>
      <occurred_at>${new Date(t.created_at_epoch).toISOString()}</occurred_at>` + …

    The observer is being shown <what_happened> as the schema for its input and then asked to emit <type>/<title>/<narrative> for its output. 120 batches came back in the input's vocabulary. Same for the smaller <event> bucket (11 across the untyped set), which pairs with <occurred_at>.

    This is worth separating from the <category> / <phase> shapes (52 combined), which are free invention. The input-echo half is fixable in the prompt rather than in the salvage path — distinct tag names for the input wrapper, or the input rendered as something that is not XML at all.

    For the unclassified question you raised: 120 of these are not "unclassifiable", they are misfiled. <what_happened> maps to narrative and <observed_from_primary_session>'s <outcome> to facts mechanically, no new enum id required.

    3. The fence stripper is anchored to the whole response

    76 batches (14.1%) were fenced. stripFence is:

    function stripFence(t) {
      let e = t.match(/^\s*```(?:xml)?\s*\n([\s\S]*?)\n```\s*$/i);
      return e ? e[1] : t;
    }

    ^…$ over the entire response means one leading sentence before the fence, or one trailing word after it, and the fence survives into the detector — where the literal ``` characters sit inside what parseObservations then tries to match. Matching the first fenced block anywhere in the response rather than requiring the response to be one fenced block covers all 76.

    Why this is 98% and not 2%

    The three shapes above (attribute form, input echo, fence) are 285 of 538 batches — 53% — and none of the three is the model failing to produce a usable observation. All three are the pipeline failing to accept one it already produced. That seems directly relevant to how this plan sequences "classify every output" against "never confirm a batch on failure": for these 285, classification is not the hard part, and the salvage mapping is mechanical.

    Happy to pull the per-shape breakdown per day, or the raw previews for any single bucket, if that is useful for the test matrix in #3593.

  10. ntdatt812 commented on Aug 24, 2026

    @ntdatt812
    Contributor

    @raka08 — I checked all three against the TypeScript source rather than the shipped bundle, since a fix lands there. Two hold exactly. The third does not, and your own table is what shows it.

    1. The attribute asymmetry is real, and it is two lines apart. src/sdk/parser.ts:

    :66   const firstRoot = /<(observation|summary)\b/i.exec(raw);          // \b — accepts attributes
    :71   if (rootName === 'observation') {
    :72     const observations = parseObservationBlocks(raw, correlationId);
    :73     if (observations.length === 0) return { valid: false };          // silent
    :90   const observationRegex = /<observation>([\s\S]*?)<\/observation>/g; // bare tag only
    

    89/89 with no diagnostics follows directly from that. The return { valid: false } on line 73 is the only arm in the function that discards a batch without logging why, which is why the bucket is invisible.

    2. <what_happened> is the input vocabulary — src/sdk/prompts.ts:144 builds the wrapper you quoted, and observationSkeleton at :24-34 asks for <type>/<title>/<subtitle> in the same prompt. Agreed that this half belongs in the prompt, not the salvage path.

    3. The fence one I do not think is the fix, and "first fence anywhere" would regress a case the anchoring exists for.

    The anchoring is deliberate — parser.ts:8-9: "content that contains internal fenced examples or surrounding prose (CodeRabbit review on PR #2282)". I ran both regexes over four shapes:

    shape anchored first-fence-anywhere
    A. response is one fenced block extracts ✅ extracts ✅
    B. no outer fence, fenced example inside the body extracts ✅ extracts ✅
    C. outer fence and a fenced example in the body extracts ✅ extracts ✗
    D. one sentence, then the fence extracts ✅ extracts ✅

    Two things fall out.

    C is the regression. With an outer fence and an inner ```js example, matching the first fence anywhere closes on the inner fence and returns a truncated fragment, and parseObservations then finds nothing. The current anchoring gets it right. That is #2282's case.

    More importantly, D says the fence is not what loses those 76. With a leading sentence the fence does survive stripCodeFences — but the backticks sit outside the tags, so /<observation>…<\/observation>/ still matches and extraction succeeds. Your own table agrees: all 76 are in extracted then skipped, none in nothing extracted. And an extracted observation is only skipped here:

    parser.ts:137   if (!title && !narrative && facts.length === 0 && cleanedConcepts.length === 0)
                      logger.warn('PARSER', 'Skipping empty observation (all content fields null)')
    

    So for those 76 the block was found and every content field came back empty. Stripping the fence changes nothing about that. Whatever shape the children are in is the cause, and it is probably the same <what_happened>/<event> vocabulary from your bucket 2 — the previews for the fenced 76 would settle it, if you still have them.

    That makes it 285 → 209 batches recovered by the two mechanical fixes, with the fenced 76 folded into the input-echo problem rather than being their own bucket. Still by far the largest recoverable share.


    One more source for the skip contract, since the issue body names only modes/*.json. There is a second, hard-coded copy in the per-tool prompt:

    src/sdk/prompts.ts:152   Return either one or more <observation>...</observation> blocks,
                             or an empty response if this tool use should be skipped.
    src/sdk/prompts.ts:155   Never reply with prose … Non-XML text is discarded.
    

    Three lines apart: return an empty response, and non-XML is discarded. plugin/modes/code.json skip_guidance says the same thing ("return an empty response only"), and the comment at prompt-builder.ts:24 states the intent outright — "or an empty response if the batch should be skipped … parseAgentXml(...) accepts the response unchanged" — which it does not; parseAgentXml returns {valid:false} for empty input on its first line. Fixing only the mode file leaves the prompt still asking for it, which is worth knowing before the 4,176 idle discards get attributed to the model.

    For the #3593 matrix: I would take the attribute form as a case there once the extractor accepts it, since that is the branch where a type arrives from a place the current tests do not cover at all.

  11. sadiash commented on Aug 24, 2026

    @sadiash

    Caveat first: this is field data from v12.1.0, not from latest. I only discovered how far behind I was while investigating. I'm posting it because the plan-18 cluster and the issues closed alongside it (#2956, #3344, #2793, #2468) were triaged without field numbers, and these might be useful for judging severity — but they say nothing about whether 13.15.x already fixes this. Happy to re-run on 13.15.3 if that's more useful.

    What I measured

    Single install, provider=claude, auth=cli, model=claude-sonnet-4-6, tier routing on.

    Observations recorded 33,352
    pending_messages rows, all status='failed' 15,392
    Effective loss rate 31.6%
    Span of failed rows 2026-04-14 → 2026-08-23 (4 months, uninterrupted)
    retry_count on every failed row 0
    context overflow log occurrences 3,212, first on 2026-04-13

    Storage at the point I looked:

    pending_messages 448.7 MB — 78% of a 578 MB database
    observations (the useful table) 73.6 MB
    logs/ 235 MB across 114 daily files, never rotated
    observer transcripts in ~/.claude/projects/ 1.1 GB across 1,751 files
    Total footprint ~3.0 GB, of which ~1.7 GB was reclaimable with no loss

    Log signature, unchanged across the whole four months:

    ERROR [SESSION] Generator exited unexpectedly
    ERROR [SESSION] Generator failed {provider=claude,
      error=Claude session context overflow: prompt is too long}
    ERROR [SESSION] Marked messages as failed after generator error {failedCount=1}
    

    Three things the numbers add

    1. retry_count = 0 on all 15,392 rows is consistent with Failed pending_messages structurally can never self-heal: retryMessage() is fully-implemented, fully-dead code (plus prompt-accretion + missing failure-path logging) #3344's finding that retryMessage() is dead code. Nothing ever attempted a second pass — not once in four months.

    2. Nothing surfaces the loss. The worker reports {"status":"ok"} throughout. /context shows observations being injected. From inside a session, memory looks like it is working; a third of it silently is not. That invisibility seems worth weighing separately from the overflow itself.

    3. The provider asymmetry is visible in config. CLAUDE_MEM_GEMINI_MAX_CONTEXT_MESSAGES / _MAX_TOKENS and the OpenRouter equivalents both exist and default to 20 / 100000. The Claude provider's only setting is CLAUDE_MEM_CLAUDE_AUTH_METHOD — no context bound, no token bound. tool_response is JSON.parsed and passed through whole, with no truncation. So the default provider is the only one running unbounded. This is Claude provider (SDKAgent) has no context bound — observer overflows with "Prompt is too long" and saves zero memory on long sessions #2956, and the 31.6% figure is what it costs in practice.

    What I did locally

    Cleanup, which reclaimed 1.72 GB (3.0 GB → 1.3 GB) with no loss of real memories:

    worker-service.cjs stop
    sqlite3 claude-mem.db "delete from pending_messages where status='failed'; vacuum;"
    # prune logs/*.log older than 30d; clear the observer-sessions transcript dir
    worker-service.cjs start

    Mitigation, to reduce what reaches the observer — CLAUDE_MEM_SKIP_TOOLS extended with the payload-heavy capture tools (screenshots, DOM snapshots, page text, tool-schema search), keeping the action tools so the narrative survives:

    ToolSearch,
    mcp__claude-in-chrome__computer,
    mcp__claude-in-chrome__read_page,
    mcp__claude-in-chrome__get_page_text,
    mcp__claude-in-chrome__browser_batch,
    mcp__plugin_playwright_playwright__browser_snapshot,
    mcp__plugin_playwright_playwright__browser_take_screenshot,
    mcp__plugin_playwright_playwright__browser_console_messages
    

    Worth noting SKIP_TOOLS is an exact-match Set, so MCP tools have to be enumerated one by one — a prefix or glob form would make this mitigation practical for anyone with a few MCP servers connected.

    Question

    Does 13.15.3 bound the Claude provider's history, or is that still what plan-18 is for? That determines whether upgrading is the fix or just a prerequisite for a useful bug report.

  12. ntdatt812 commented on Aug 24, 2026

    @ntdatt812
    Contributor

    @sadiash — on your closing question, I can answer the code half of it from main at e2d1df5 (the 13.15.3 changelog commit). No, 13.15.3 does not bound it, for any provider.

    conversationHistory is initialized empty and is only ever appended to:

    $ grep -rn "conversationHistory" src/ --include=*.ts | grep -vE "\.push\(|\.length"
    src/services/worker/SessionManager.ts:127    conversationHistory: [],
    src/services/worker-types.ts:24              conversationHistory: ConversationMessage[];
    src/services/worker/OpenAICompatibleProvider.ts:111/225/283   this.query(session.conversationHistory, config)
    src/services/worker/http/routes/SessionRoutes.ts:133          // The shared conversationHistory ensures context is preserved
    
    $ grep -rn "conversationHistory\.\(slice\|shift\|splice\)\|conversationHistory =" src/ --include=*.ts
    (nothing)
    

    No slice, no shift, no splice, no reassignment anywhere in src/. The array grows for the life of the session and is passed whole to the provider on every turn.

    The per-provider settings are the same story. Enumerating every CLAUDE_MEM_{CLAUDE,GEMINI,OPENROUTER}_* reference at HEAD gives:

    CLAUDE_MEM_CLAUDE_AUTH_METHOD
    CLAUDE_MEM_GEMINI_API_KEY / _MODEL / _RATE_LIMITING_ENABLED
    CLAUDE_MEM_OPENROUTER_API_KEY / _MODEL / _BASE_URL / _SITE_URL / _APP_NAME
    

    There is no _MAX_CONTEXT_MESSAGES and no _MAX_TOKENS for any provider at HEAD.

    Two limits on what I just said, so you can weigh it:

    • My clone is shallow (11 commits), so I cannot tell you whether the Gemini bounds you saw in 12.1.0 were removed or renamed — only that nothing by those names exists now. Worth checking against full history before anyone concludes a regression.
    • I have not run 13.15.3, so this is a code answer, not a field answer. It does say that upgrading is a prerequisite rather than the fix for the overflow half.

    One thing that does not apply to your install, since it would otherwise look relevant: the double-append I reported in #3619 is in OpenAICompatibleProvider — ResponseProcessor.ts:295 records the assistant reply and that provider records it again, so its history grows at twice the rate. You are on provider=claude, where ResponseProcessor is the only writer, so your 31.6% is not that. Your numbers stand on the unbounded history alone.

    On the SKIP_TOOLS exact-match Set — that one is small and self-contained enough to be worth its own issue rather than a line in this thread, if you want the prefix form to actually happen.

  13. Priscu commented on Aug 28, 2026

    @Priscu

    Adding a precise data point from a production fleet (13.16.1, macOS, PROVIDER=claude, MODEL=claude-sonnet-4-6, 25 concurrent sessions).

    Symptom: the default ~/.claude profile was logged out after a reboot. Every observer batch got the CLI prose Not logged in · Please run /login. Result over ~3 hours: 4,502 messages enqueued, 857 batches logged as SDK returned non-XML prose response — ignoring queued batch, 0 observations written, and the batches were consumed and dropped.

    Root cause in the bundle: the prose handler ends with confirmClaimedMessages(sessionDbId) (batch confirmed = lost). The auth guard that would preserve the batch and pause the generator (resetProcessingToPending + abortReason="auth:observer_text", log line "authentication failed; run /login to preserve queued batch") never fires, because its matcher (UZ) only recognises failed to authenticate, authentication failed|failure|error and auth … phrasings - not the CLI's actual wording Not logged in.

    Suggested fix: (1) add /\bnot logged in\b/ (and please run \/login) to the auth matcher; (2) more robustly, as #3606 proposes: never confirm a batch on any unparsed prose - reset to pending and pause. A batch that did not parse was not processed.

    Happy to test a build against the same setup.

  14. 40 remaining items

  15. Montinou commented on Oct 7, 2026

    @Montinou
    Contributor

    Step 5 slice: let the review-only dedup tier record a verdict

    Step 5 keeps the fuzzy tier review-only, and #3038 shipped that half. observation_dedup_candidates (v56) allows status IN ('pending','merged','distinct','dismissed'), but nothing in src/ writes anything except 'pending' (dedup-store.ts:215, :268), and the HTTP surface is GET /api/dedup/candidates plus POST /api/dedup/scan only (DedupRoutes.ts:29-30). A reviewer can list candidates but cannot record a decision, so the list only grows and every pass re-reviews the same pairs. Data point from one install with dedup off: 359 project+title duplicate groups, 165 of them created this month.

    Proposed slice, no new tables and no background work:

    • POST /api/dedup/candidates/:id/resolve with { "status": "distinct" | "dismissed" }: 409 dedup_disabled like the scan route, 404 for an unknown id, 400 for any other status.
    • GET /api/dedup/candidates accepts an optional status filter; the default stays as today.
    • A resolved pair stays resolved on the next scan: UNIQUE(observation_id, duplicate_of_id) with INSERT OR IGNORE already guarantees it, and a test pins that.
    • merged stays out of this slice: merging rewrites rows (and synced columns), so it deserves its own decision.

    Tests: resolve to each status, rescan keeps the verdict, disabled returns 409, invalid status returns 400, list filter.

    Happy to send it as a PR if it fits the plan.

  16. ahmedibrahim085 commented on Oct 15, 2026

    @ahmedibrahim085
    Contributor

    New child for this plan: one busy session's observer backlog grows faster than the Claude observer can drain it, because the Claude provider sends one queued event per prompt. Opt-in fix in #4793.

    • Symptom: one session with many subagents queued 600-1060 events an hour while its observer drained about 275-430. The in-memory backlog peaked near 4,800 events, and a worker restart would discard it.
    • Root cause: ClaudeProvider claims one message from the iterator per prompt. Codex already batches same-context events (CodexProvider.observationTurnPrompt); Claude does not.
    • Fix sketch: an opt-in CLAUDE_MEM_CLAUDE_OBSERVATION_BATCH_SIZE (default 1) that reuses claimNextObservation + sameObservationContext. A batch stays within two capped fields, and an oversized field ends it.
    • New test-matrix cells: batch barrier per agent/prompt/cwd, an oversized field ending a batch, the two-field budget, and the confirm count of an answered batch.
    • Open question for this plan: with interleaved subagents a batch averages only about 1.6 events at size 8, so a per-agent observer stream may be the bigger lever.
  17. thedotmack commented on Oct 19, 2026

    @thedotmack
    OwnerAuthor

    Round N consolidation (2026-10-19 community sweep)

    • OpenRouter observer still ~13x input tokens per observation on 13.41.0 (after #3868) #4847 (@vitorhmcorreia): on 13.41.0 the OpenRouter observer averages ~26k input tokens per observation vs ~2k for the Claude observer (222 vs 215 rows, same output size). Cause: the only history bound is OBSERVER_CONVERSATION_MAX_CHARS = 400_000 (src/shared/observer-recycle.ts:31, fix(worker): bound observer context growth #3625), and a stateless provider resends the whole history each call, so cost grows up to ~100k tokens per call before the generation recycles. Item 3's maxHistoryTokens budget needs a much smaller default for stateless providers.
    • Same report: oversized-field compression of 20–37k-char tool output hits maxTokens=4096 and comes back empty (4×), and the Discarding stale memory_session_id ... (Issue #817) line fires on every generator resume, so it no longer signals a restart.
  18. thedotmack commented on Oct 29, 2026

    @thedotmack
    OwnerAuthor

    Round N consolidation (2026-10-29 community sweep)

  19. tbrandenburger commented on Oct 31, 2026

    @tbrandenburger

    Data point for "bound every history", from claude-mem 12.6.2 on macOS (arm64):

    • One observer process (claude --model claude-haiku-4-5 --resume <id> --output-format stream-json) kept resuming the same session and appended roughly 100 MB per minute to a single transcript in ~/.claude/projects/-Users-<user>--claude-mem-observer-sessions/.
    • That one JSONL reached 54 GB before the disk ran full (300 MB free). Two older transcripts from the same pattern were 26 GB and 16 GB. All other ~2,400 observer transcripts together were a few GB.
    • Killing the process and deleting the three files freed 96 GB.

    Similar to #1937 and #2754 (closed into #2780), but the loop still happened months later. I have now updated to 15.7.0 and will report back if it recurs. A hard size cap per observer transcript (or not resuming a session above a threshold) would have prevented this.

  20. ShitK commented on Nov 15, 2026

    @ShitK
    Contributor

    Proposed slice: minimum content for generated summaries (#5184)

    I reproduced the minimum-content part of #5184 on main 62ca1eb865ddc08daad6a23e64f1418b928df7d0 (15.18.4), using the real SessionManager/RAM buffer, processAgentResponse, and an in-memory SQLite SessionStore. Replies were deterministic fixtures; no live inference or production data was used.

    A request-only summary, a next-steps-only summary, their combination, and a request with whitespace-only progress fields all insert a summary row, set lastSummaryStored=true, confirm the claimed message, and broadcast a summary. The proposed storage expectations fail for all four on unchanged main. The existing parser/notes-only suites pass (10 tests); the separate characterization fixture passes 12 cases. This was run with Bun 1.3.13, not the current CI's 1.4.4.

    There is an important compatibility constraint: response-processor-notes-summary.test.ts explicitly accepts notes-only summaries. I propose a narrow minimum-content rule, rather than requiring every schema field: at least one of investigated, learned, completed, or notes must be non-empty after the existing parser's decoding/trimming. request and next_steps alone would not qualify. This cannot validate factual or semantic quality.

    I would keep XML validity separate from storage eligibility. Simply returning valid:false routes a queued reply into the existing output-retry path (confirmed with an empty-summary control). For these newly rejected, already-answered summaries, the proposal is terminal no-store handling: preserve source evidence and completion deduplication, terminally confirm only the answered batch (without requeueing it), report a content-free diagnostic, and allow fresh work normally. No extra paid retry, fallback, startup replay, or historical regeneration.

    Scope: shared response/storage boundary, prompt guidance, real SQLite/buffer regressions, and a provider-boundary dispatch test proving no extra send and subsequent fresh-work recovery. No schema migration or deletion of old summaries. A content-bearing summary returned to an observation turn is also reproducible, but request/reply type enforcement would remain a separate slice.

    Does that minimum-content rule fit the intended contract, particularly retaining notes-only replies while declining a reply containing only future plans? I have the reproduction and plan ready; implementation has not started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

planplan-18oh-my-issues plan master #18

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions