Skip to content

Stage-1 has no move for compound, unambiguous requests (multiple intents in one message) #1909

Closed

Description

@malibio

Overview

Stage-1 (#1815, ADR-038) gives the model exactly two moves: route_query (one capability, one search string) or route_clarify (the request is ambiguous — which of these did you mean). Neither move has a correct answer when one message contains multiple distinct, unambiguous intents — e.g. "log this expense and remind me to follow up Friday." Nothing is unclear about what the user wants; there are just two of them.

This is not yet known to be a real, reproducible failure — it's a structural gap identified by reading routing.rs against ADR-064/#1815's own contract, not a live-measured defect. Filing as an investigation, per the standard this cluster has been holding to: verify against real source and real model behavior before proposing a fix.

Why this isn't already covered

  • route_query's schema (routing.rs:122-131) takes a single query: string — "a short description of the capability needed," singular.
  • route_clarify (routing.rs:133-154) is explicitly scoped to ambiguity ("too ambiguous to describe as a capability"), not to multiplicity. Its own description says nothing about compound requests, and forcing a compound-but-unambiguous request through it would produce exactly the "bare what do you mean" failure mode ADR-038 says to avoid — the request isn't unclear, so there's nothing to ask.
  • Implement ADR-038 Stage-1 and Stage-2 gates; shipped loop is the rejected single-turn pull #1815's acceptance criteria state the clarification contract as "at most one per intent, then fall through to semantic search" — which presumes intent count is already known going in. Nothing establishes that today.

Live reproduction (completed, widened)

PR #1916 added packages/agent/tests/live_stage1_compound_intent.rs, which fires production's exact Stage-1 request (STAGE1_SYSTEM_PROMPT, stage1_tool_definitions(), temperature 0.1, STAGE1_MAX_TOKENS) against the locked native model, loaded in-process (ADR-056: Gemma 4 E4B via llama.cpp) — not a served stand-in.

Initial pass used 5 compound-but-unambiguous prompts. A follow-up commit widened this to 11 compound prompts (varied phrasing, 3-intent requests, mutating and read-only intent combinations) plus 18 single-intent controls, per the acceptance criterion below. Full raw traces posted as issue comments.

Findings, split by evidentiary weight:

  1. Structural fact, confirmed at both n=5 and n=11, does not need a larger sample: route_clarify is never called for a compound prompt (0/5, then 0/11). Two typed tools exist, the model must call one, and it always resolves to route_query, merging all intents into a single string. This is closer to a deterministic property of the code than a measured frequency.
  2. Rate claim, measured at n=11, still not fully decision-grade (single run): the merged query drops or fabricates a detail in 5/11 (45%) of compound prompts, up from 1/5 (20%) at the smaller sample. Both 3-intent prompts tested came back lossy, and loss was observed on a read-only+read-only combination too (not just mutating intents, as the smaller sample suggested). One "lossy" case was borderline — a heuristic (substring keyword match) false negative rather than a clear failure — so treat 45% as directional, not exact. Per Agent matrix 10/12 -> 6/12 does not reproduce: fixture change plus single-run variance, not a regression #1862's standing lesson on single-run numbers, a repeat run is warranted before treating this rate as stable, though the direction (loss is real, not rare, and does not improve with a larger sample) is now well supported.

Recommendation

Consistent with ADR-038/ADR-064's channel doctrine (discriminated tool choice, not free text or a bolted-on classifier), the minimal extension is a third typed Stage-1 tool — e.g. route_multi — whose schema takes an array of per-intent query strings (mirroring route_query's single query: string, pluralized), rather than relying on the model to compress N intents into one string. Each element re-enters retrieval independently, same as today's single query does, so Stage-2's per-candidate trust boundary and score gating are unaffected — this only changes how many route_query-equivalent decisions Stage 1 can emit per turn.

Proceed with this design on the strength of finding (1) — the structural gap is real and doesn't need more evidence to justify designing the tool. The widened rate in finding (2) strengthens rather than weakens the case that this is worth fixing (45% vs. 20%), but should not be cited as a precise number — only as directional support that fixing this is worthwhile.

Acceptance Criteria

  • Live reproduction: confirm or refute whether compound, unambiguous requests currently fail, degrade, or happen to work today, with raw traces
  • If confirmed: a recommendation for the minimal extension consistent with ADR-038/ADR-064's channel doctrine (route_multi, above)
  • Widen the compound-prompt sample past 5 (varied phrasing, 2-intent and 3+-intent cases, mutating and read-only intent combinations) to establish an actual baseline degradation rate before finalizing route_multi's exact design — done: 11 prompts, 45% lossy (up from 1/5 at the original sample), structural finding (0% route_clarify) holds at both sample sizes
  • Optional: a repeated run of the widened sample to check the 45% figure for run-to-run variance before treating it as a stable rate (per Agent matrix 10/12 -> 6/12 does not reproduce: fixture change plus single-run variance, not a regression #1862) — not blocking route_multi design, since that proceeds on the structural finding regardless
  • Implement route_multi as a third typed Stage-1 tool per the recommendation above
  • Before merging the route_multi implementation: run the full routing/retrieval matrix (multiple repetitions, compared against the current baseline), not just a re-run of the compound-prompt set — per the Fix Schema Creation routing so the model can reach create_schema for natural tracking phrasing #1904/Post-ADR-064 matrix baseline: has the doctrine wave actually moved reliability, and what still fails #1911 precedent, where a routing/retrieval change validated only against the scenario that motivated it shipped a clean regression on a bystander scenario nobody was watching. A new Stage-1 tool changes what every turn's routing step can do, not just compound-intent turns.

Explicitly out of scope for this issue

  • Building a new ML intent-classifier. ADR-064's evidence points toward trusting/extending the existing structural gates (typed tool choice, not free-text or a bolted-on model) rather than adding a new instruction surface — a new classifier would need its own strong justification against that doctrine, not be assumed as the answer going in.
  • Redesigning Stage-1 itself. The fix is a minimal extension consistent with ADR-038/ADR-064 (a third typed tool, following the same "discriminated choice, not free text" pattern as route_query/route_clarify), not a parallel mechanism.

Reference Files

Related Issues

Activity

  1. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Live reproduction: confirmed on the locked native model

    PR #1916 adds packages/agent/tests/live_stage1_compound_intent.rs, which fires production's exact Stage-1 request (STAGE1_SYSTEM_PROMPT, stage1_tool_definitions(), temperature 0.1, STAGE1_MAX_TOKENS) against the locked native model, loaded in-process (ADR-056: Gemma 4 E4B via llama.cpp) — not a served stand-in over Ollama, which the harness deliberately avoids for the same reason routing_latency.rs does (a served copy measures a different stack and has previously produced a suppression result that didn't apply to what ships).

    Method

    5 compound-but-unambiguous prompts (two distinct operations, no ambiguity about either half), each with a single-intent control using the same domain/phrasing so degradation specific to compounding can be told apart from ordinary query-quality noise.

    Raw trace (gemma-4-e4b-q4km, native)

    -- single-intent controls --
      [expense only  ] Log a $42 lunch expense.
          -> route_query("log expense")
      [search only   ] Find my notes about the Q3 budget.
          -> route_query("find notes about Q3 budget")
      [task only     ] Add a task to call the plumber.
          -> route_query("add reminder or to-do list item for plumber call")
      [note only     ] Write down that the client meeting moved to 3pm.
          -> route_query("update meeting time to 3pm for client meeting")
      [delete only   ] Delete the draft invoice for Acme Corp.
          -> route_query("delete draft invoice for Acme Corp")
    
    -- compound, unambiguous prompts --
      [expense + reminder] Log a $42 lunch expense and remind me to follow up with Sarah on Friday.
          -> route_query("log expense and set reminder")
          (mentions both intents by keyword: true)
      [search + create] Find my notes about the Q3 budget and create a task to review them tomorrow.
          -> route_query("find notes and create task from content")
          (mentions both intents by keyword: false)
      [two tasks     ] Add a task to call the plumber and add another task to pay the electric bill.
          -> route_query("add multiple to-do list items for calling a plumber and paying an electric bill")
          (mentions both intents by keyword: true)
      [note + task   ] Write down that the client meeting moved to 3pm and add a task to update the calendar invite.
          -> route_query("update meeting time and add calendar task")
          (mentions both intents by keyword: true)
      [delete + search] Delete the draft invoice for Acme Corp and find all other invoices from last month.
          -> route_query("delete draft invoice and find past month's invoices by client name")
          (mentions both intents by keyword: true)
    

    What this establishes (acceptance criterion 1)

    • route_clarify is never called for any compound prompt. The structural gap the issue named — neither Stage-1 tool has a correct answer for "two things, neither ambiguous" — does not manifest as the model getting stuck asking "what do you mean?" It always resolves to route_query.
    • The model silently merges both intents into one query string, every time, with no third move and no failure to tool-call.
    • That merge sometimes drops specificity, not just verbosity. Compare the single-intent control "find notes about Q3 budget" against the compound case's "find notes and create task from content" — "Q3 budget" is gone entirely, replaced with a generic "content." The other four compound cases retain both intents' key nouns. This is the failure mode the issue anticipated: not a crash, not a bad clarify loop, but degraded retrieval quality carried forward into whatever Stage-2 search that single merged query drives — silent, not loud.
    • Compare also "delete draft invoice and find past month's invoices by client name" — the model added "by client name" unprompted, which wasn't in the original request. Not a dropped intent, but a fabricated qualifier, on the one compound case where deletion is in play.

    Recommendation (acceptance criterion 2)

    This is confirmed as a real, live-reproduced gap, not just a structural read of the code. Consistent with ADR-038/ADR-064's channel doctrine (discriminated tool choice, not free text or a bolted-on classifier), the minimal extension would be a third typed Stage-1 tool — e.g. route_multi — whose schema takes an array of per-intent query strings (mirroring route_query's single query: string but pluralized), rather than relying on the model to compress N intents into one string. Each element would re-enter retrieval independently, same as today's single query does, so Stage-2's per-candidate trust boundary and score gating are unaffected — this only changes how many route_query-equivalent decisions Stage 1 can emit per turn.

    Given the risk is silent information loss rather than an outright failure, and it was reproduced consistently across 4/5 compound prompts on the shipped model, this looks worth fixing rather than closing as "degrades gracefully enough." That said, given the small sample size (5 prompts) this is directional evidence, not a statistically powered study — worth a wider prompt set before committing to the route_multi design if there's appetite to invest further before implementing.

  2. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Strong investigation — the single-intent controls alongside each compound case is exactly the right design (isolates "compounding causes degradation" from "this phrasing is just harder"), and using the in-process native model rather than a served stand-in was the right call given the precedent you cited.

    The finding is more useful than a simple confirm/refute: no crash, no bad clarify loop, route_clarify never fires — it's silent, not loud. The two concrete examples are the real payload here: "Q3 budget" disappearing entirely into a generic "content," and "by client name" being fabricated out of nothing on the deletion case. That's specific, observed information loss and fabrication, not a hypothetical risk. Confirmed: worth fixing, not closing as "degrades gracefully enough."

    route_multi as a third typed Stage-1 tool is the right shape — consistent with the discriminated-choice doctrine, doesn't touch Stage-2's trust boundary, and avoids inventing a parser or a bolted-on classifier.

    Before building it, two things given what #1911 just cost us:

    1. Widen the prompt set past 5 before locking the route_multi design — you already flagged this yourself, and I'd hold to it. n=5 is enough to confirm the gap exists, not enough to design the fix's exact shape (e.g., is 2-intent compounding representative, or does 3+ intents behave differently; does the fabrication-of-qualifiers pattern on deletion generalize to other mutating intents).
    2. Once built, this needs a full matrix run before merge, not just re-running the compound-prompt set. Fix Schema Creation routing so the model can reach create_schema for natural tracking phrasing #1904 is the direct cautionary tale one issue over: a change to shared routing/retrieval surface, validated only against the scenario that motivated it, shipped a clean regression on a bystander scenario that nobody saw until Post-ADR-064 matrix baseline: has the doctrine wave actually moved reliability, and what still fails #1911's full pass. A new Stage-1 tool is exactly this class of change — it alters what every turn's routing step can do, not just compound-intent turns. Full matrix, multiple repetitions, compared against current baseline (5.2/12) before this lands.

    Proceed on that basis.

  3. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Sample-size caveat on the compound-intent finding

    A second independent review on PR #1916 flagged something worth surfacing explicitly here rather than leaving buried in a PR comment: the "route_query silently drops specificity" finding in the trace above rests on 1 run of 5 compound prompts, and the specificity-loss failure mode was observed in 1 of those 5 ("find notes and create task from content" losing "Q3 budget"; the other 4 compound cases retained both intents' key nouns).

    This project has a standing lesson from #1862 that single-run matrix numbers are not decision-grade — the same caution plausibly applies here. My original comment above only softly noted the small sample ("worth a wider prompt set... if there's appetite"), which may understate it given that precedent.

    Question for whoever picks this up next (or for a decision now): should this issue get a wider/repeated prompt set run before the route_multi recommendation is treated as validated, or is the qualitative finding (Stage 1 has no third move and always merges) strong enough on its own — independent of the specificity-loss rate — to proceed with a route_multi design regardless of whether it's 1/5 or 3/5 prompts that show information loss?

  4. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Good catch, and worth separating into two claims with different evidentiary weight rather than answering as one question:

    1. "Stage-1 has no third move and always merges." This doesn't need a bigger sample — it held 5/5, and it's not really a rate claim in the first place. It's a structural fact: two typed tools exist, the model must call one of them, so "always resolves to route_query, never route_clarify" is closer to a deterministic property of the code than a measured frequency. This part is solid enough on its own to justify designing route_multi — you don't need more trials to know the third move doesn't exist today.

    2. "The merge silently drops specificity / fabricates a qualifier." This is a rate claim, and #1862's lesson does apply directly: 1/5 and 1/5 (different prompts) cannot tell you if this is common or a one-off, and can't rule out it being specific to those two prompts' phrasing rather than a general property of compounding. This part is NOT validated enough to use as the severity/priority justification, or to size how much route_multi will actually help versus how often the current behavior happens to work out fine.

    So: proceed with the route_multi design now on the strength of (1) — the structural gap is real and doesn't need more evidence. But don't cite the specificity-loss rate as the reason it's urgent, and do widen the prompt set (aim for enough runs to say something like "degrades on roughly N% of compound prompts," not just "we saw it happen once") before or alongside implementation, so the fix can be evaluated against an actual baseline rate rather than anecdote. Same standard #1911 already set for the matrix — this is just the same discipline applied to a smaller, newer investigation before it hardens into unquestioned fact.

  5. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Widened sample: 5 → 11 compound prompts, 45% lossy (up from 20%)

    Per the follow-up acceptance criterion, widened the compound-prompt sample (PR #1916, latest commit) to 11 prompts covering varied phrasing, 3-intent requests, and mutating/read-only combinations, plus 18 matching single-intent controls. Full trace in the test's gitignored artifact; summary below.

    Result (gemma-4-e4b-q4km, native, single run)

    route_clarify called: 0/11
    route_query, faithful (mentions all intent keywords): 6/11
    route_query, lossy (dropped or fabricated a detail): 5/11
    

    The structural finding holds at wider n: route_clarify still never fires — 0/11, same as 0/5 before. This was already treated as solid at n=5 (a property of the code, not a rate), and nothing here changes that.

    The rate claim moved materially: 5/11 (45%) lossy vs. the original 1/5 (20%). Notable patterns in the new data:

    • Both 3-intent prompts came back lossy. "Add a task to renew my passport, add a task to book the flight, and add a task to email the hotel about early check-in" → route_query("add multiple to-do list tasks for travel planning") — all three specific nouns (passport, flight, hotel) gone, replaced with a topic label. This is a stronger version of the same failure seen at n=5, and suggests loss may get worse, not just "sometimes happen," as intent count grows — though n=2 here isn't enough to call that a trend on its own.
    • The read-only+read-only case was also lossy: "Find my notes about the marketing budget and also find any tasks tagged 'urgent'" → route_query("find notes and tasks by tag or topic"), losing both "marketing" and "urgent". So this isn't confined to mutating intents (delete/create) — a caveat on the earlier "fabrication on deletion" observation, which doesn't repeat here (the mutating x2 case, delete+create, actually came back faithful this run).
    • One borderline case: "search + create + reminder" was marked lossy by the strict keyword heuristic, but reading the actual query — "find notes, create task to review payment terms, set reminder for feedback by Wednesday" — it arguably preserved the request faithfully; it just didn't literally contain the word "vendor". This is a heuristic limitation (substring match, not semantic equivalence), not necessarily a real loss, and is a reminder that the "lossy" count here has some heuristic noise in it — treat 5/11 as directional, not exact.

    Still not decision-grade on its own

    This is one run. Per #1862's standing lesson, a single 45% doesn't establish a stable rate — it's stronger evidence than 1/5 was, and it's consistent in direction (loss is real and not rare), but it should not be treated as "the" degradation rate without at least one repeat run to check for run-to-run variance, especially given the heuristic-noise caveat above.

    Recommendation, updated

    Proceed with the route_multi design — this was already justified by the structural finding alone and remains so. The widened rate (45% vs 20%) strengthens rather than weakens the case that this is worth fixing rather than deferring; it does not change the recommended shape (a third typed Stage-1 tool per ADR-038/064's discriminated-choice doctrine).

    Before merging a route_multi implementation: still requires the full matrix run per the #1904/#1911 precedent (this widened prompt set alone is not a substitute for that — it only measures Stage-1's current behavior, not what a fix does to the rest of routing).

  6. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Where this stands / next-step question

    Investigation phase is essentially complete: the structural gap (route_clarify never fires for a compound prompt) is confirmed at two sample sizes (0/5, then 0/11), and the degradation rate is measured and directionally solid — 45% lossy at n=11, up from 20% at n=5 — though per #1862 not decision-grade to the exact percentage on a single run.

    Remaining work per the acceptance criteria above is implementation: build route_multi as a third typed Stage-1 tool, then gate its merge on a full routing/retrieval matrix run (multiple repetitions vs. current baseline) per the #1904/#1911 precedent, since a new Stage-1 tool changes what every turn's routing step can do, not just compound-intent turns.

    That's a materially larger scope change than the investigation work done so far — it touches shared routing surface directly. Should I continue straight into that route_multi implementation now, or pause here so it can be picked up as deliberate, separately-scoped work?

  7. added a commit that references this issue on Aug 2, 2026
  8. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Answering the open question: yes, continue into route_multi — but not first

    Picking this up per #1917's standing brief. Nobody else is working this; answering the question left in the previous comment rather than leaving it open.

    On whether to proceed: yes. The full-matrix-before-merge gate (rule 3 of #1917, the #1904/#1911 precedent) already governs the exact risk that question raises — a new Stage-1 tool changing what every turn's routing step can do. That gate is the control, so the question doesn't need a separate decision.

    On sequencing, I am deliberately not making this the first unit of work, and want the reasoning on the record since it deviates from the backlog order:

    None of the 12 agent-matrix scenarios is a compound-intent prompt. route_multi addresses a real, live-reproduced gap (route_clarify 0/11, 45% lossy merges at n=11) but its expected effect on the matrix metric is zero-to-negative: it adds a third tool to shared Stage-1 routing surface — the same change class that produced #1904's bystander regression — and landing it costs a full 3-rep matrix gate (~1 hour wall-clock). Under a goal measured strictly by matrix score, that is correct work at the wrong time.

    The WIP commit (43862281) and PR #1916 stay as they are. This issue is not blocked; it is sequenced behind work that moves the measured metric.

    Recommendation for whoever lands it: the investigation here is complete and solid. The structural finding (Stage 1 has no third move) needs no more evidence. When route_multi is implemented, gate it on a 3-rep full matrix vs. the current 5.2/12 baseline, not on the compound-prompt set — that set measures Stage-1's current behavior, not what the fix does to everything else.

  9. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    route_multi implemented, but with a real bug found under multi-turn conditions — recommendation attached

    Picking this back up: the 1909 worktree/branch had drifted 1 commit behind main (missing PR #1928's fixes) and had unresolved RouteDecision::Multi match-arm compile errors in two test files. Both are now fixed — merged main in, resolved the conflict (kept main's stricter panic!-on-unexpected-decision style for the scenario-6 golden test, added a Multi arm that also panics since scenario 6 is genuinely single-intent), and the branch now builds and lints clean with all non-ignored tests passing. None of this had been pushed yet — the remote issue-1909-stage1-compound-intent branch (what PR #1916 currently shows) is still stuck at the old WIP commit, predating the route_multi implementation entirely.

    Before pushing, though: earlier live matrix testing surfaced a real defect that's still unresolved. route_multi fires on single-intent turns during multi-turn conversations, fabricating a second "intent" that reads like adjacent/upcoming conversation content rather than anything in the actual current message — confirmed deterministic across 2 reps (4 spurious firings each). It didn't cause scoring failures in those reps, but it's a genuine correctness bug in shipped behavior, not noise.

    Root cause, traced just now: context_ops::build_retrieval_query (shared by Stage-1 routing and schema retrieval) joins prior turns and the current message into one plain-text blob via parts.join("\n") — no delimiter or label distinguishing "this happened before" from "this is the current request." Handing the model that flat blob under a routing prompt that now includes route_multi is exactly the setup that would make it read blended history as a second intent of the current turn.

    Options:

    1. Fix the blending format — add a clear boundary/label in build_retrieval_query between prior turns and the current message, validate against the golden-prompt harness, then run the full 3-rep matrix gate (Rule 3 applies: shared retrieval surface). Directly fixes the root cause but touches code schema retrieval also depends on.
    2. Push as-is, flag the bug openly — update PR Implement route_multi for compound-intent routing, fix spurious firing under history (#1909) #1916 with the current commits (route_multi implemented, single-turn results clean at 11/11) and document the spurious-firing defect as a known, unresolved limitation for review/discussion rather than fixing it now.
    3. Drop route_multi, close out Stage-1 has no move for compound, unambiguous requests (multiple intents in one message) #1909 — the single-turn signal was clean, but the multi-turn defect suggests this isn't safe to ship yet. Abandon the branch/PR and record the finding here for future reference.

    Recommendation: option 1. The root cause is identified and narrow (one function, one formatting decision), the fix is testable cheaply via the existing golden-prompt harness before spending a full matrix run, and shipping route_multi with a known, reproducible false-positive mode (option 2) just defers the same fix while leaving broken behavior live. Proceeding with option 1 unless redirected.

  10. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Agreed — option 1. The root-cause trace is solid (no boundary/label between prior-turn and current-message content in build_retrieval_query's flat join is exactly the kind of ambiguity that would make a model misread blended history as a second intent), and it's narrow enough to fix cheaply rather than ship broken or abandon working infrastructure over it.

    One addition given this session's own hard-earned lesson from the four rejected retrieval-merge variants earlier: since build_retrieval_query is shared with schema retrieval, don't just validate that the fabrication stops — explicitly re-check the golden-prompt harness's existing passing cases (8a, 8b, scenario 4, the scenario-6 golden sequence) against the new blending format before the full matrix gate. Those four are exactly the kind of "quietly regresses while the target case looks fixed" candidates this cluster has hit repeatedly on shared-surface changes. Full 3-rep matrix gate after that, per rule 3, same as everything else touching this surface. Proceed on option 1.

  11. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Golden-prompt re-check: all 4 pass under the new framing

    Ran the fix (PRIOR CONTEXT / CURRENT REQUEST labeling in stage1_query, extracted into a shared stage1_query_from_turns so the golden-prompt harness exercises the exact same code path production uses, not a bypass of it — the harness previously called build_retrieval_query directly, which would have missed this fix entirely) against all 4 named cases, serially (--test-threads=1, to avoid concurrent GGUF loads exhausting GPU memory — 4 parallel loads OOM'd on the first attempt):

    test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 871.70s
    
    • 8a (start tracking albums...): passes (unasserted baseline capture, unchanged shape)
    • 8b control (tracker for venues I book): passes — route_query("tracker for venues I book")
    • scenario 4 (laser cutter creation): passes
    • scenario 6 (the target case — "The 2400 one came back — set it to returned" with 2 prior turns blended): passes its strict assertions (contains "2400", contains an update/return/set verb, does not fall through to Clarify/Multi/None)

    No regression on any of the four bystander cases from adding the framing. Proceeding to the full 3-rep matrix gate per rule 3.

  12. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    3-rep matrix gate result: does not clear rule 3's bar, but the targeted bug is confirmed fixed

    Ran the labeling fix (PRIOR CONTEXT / CURRENT REQUEST framing in stage1_query) through the full 3-rep matrix gate per rule 3, on branch worktree-issue-1909-stage1-compound-intent at 6e472bc8 (main merged in, includes PR #1928's fixes). Isolated daemon (NODESPACE_HOME=/tmp/nodespaced-test, purged DB, fresh release build), model confirmed loaded (gemma-4-e4b-q4km, n_ctx=32768) before each rep.

    Scores: 9/12, 7/12, 6/12 — mean 7.3/12. Bar is mean ≥10/12 with no scenario failing all 3 reps. This run does not clear it.

    What the fix achieved (confirmed)

    Across all 3 reps × 12 scenarios (36 Stage-1 routing decisions), routingDecision was never "multi" in the raw trace. The spurious route_multi firing this fix specifically targeted — fabricating a second "intent" out of blended prior-turn content — did not reproduce once. That's the result this branch of work set out to get.

    What it didn't achieve

    Scenario 6 (the fix's own motivating case) failed all 3 reps. But not from route_multi or bad Stage-1 routing — every trace shows Stage 1 correctly emitting route_query with candidates injected (routingDecision: "query", stage2CandidatesInjected: true). The failure is downstream, in Stage 2, which asks the user for a node ID in prose instead of calling resolve_query:

    "I need a specific node ID to mark an item as returned. Could you please provide
     the unique identifier for the laser cutter that was checked out on December 12th?"
    

    Identical shape across all 3 reps. This is the separately-documented Stage-2 gap from earlier in this investigation (model declines to call resolve_query even when fully available and correctly instructed) — unaffected by this fix, since this fix only touches the Stage-1 chat message.

    The declining rep-to-rep trend (9 → 7 → 6) looks unrelated to this fix

    None of these three failure modes involve Stage-1 routing or route_multi in the trace.

    Where this leaves #1909

    The structural gap this issue identified is real (confirmed at n=5, n=11, and now again structurally via zero spurious-Multi across 36 more trials) and route_multi is implemented correctly for its own narrow purpose. But the branch does not currently move the matrix mean, and scenario 6 — the scenario most directly relevant to Stage-1 routing quality — is blocked by a separate, already-known Stage-2 issue that route_multi was never meant to fix.

    Not taking further action (commit/push/merge) pending direction, per standing process.

  13. malibio commented on Aug 3, 2026

    @malibio
    CollaboratorAuthor

    Merge — the fix is correct, the low aggregate is explained by unrelated issues

    Directive: merge this now. Zero regressions attributable to this fix (spurious route_multi firing eliminated, confirmed at n=36 across 3 reps), and every failure in the 7.3/12 result traces to already-tracked, pre-existing issues untouched by this branch — #1926 (grammar-decoder JSON corruption), #1927 (zero-property persistence on 8c), and the separately-documented Stage-2 resolve_query refusal gap. Holding a verified, isolated, correct fix hostage to an unrelated aggregate number conflates two different questions.

    Proceed: commit, push, open the PR properly (worktree → PR → /pragmatic-code-review, per the process this session already re-established), and merge once reviewed. Once #1926/#1927/the Stage-2 gap are separately resolved, this fix's real contribution will show cleanly on a healthier baseline rather than needing to be retested from scratch.

  14. malibio commented on Aug 3, 2026

    @malibio
    CollaboratorAuthor

    Merged

    PR #1916 merged as 2002fa82 (squash). route_multi is implemented and live on main:

    • Third typed Stage-1 tool for compound, unambiguous requests, per ADR-038/ADR-064's discriminated-choice doctrine.
    • The spurious-firing bug found during live validation is fixed (PRIOR CONTEXT / CURRENT REQUEST labeling in stage1_query) — confirmed at zero occurrences across 36 live trials (3-rep matrix gate).
    • Unit test coverage added for the fan-out/merge/dedup path per code review.

    Net effect on the matrix score is currently neutral — the 3-rep gate came back at mean 7.3/12, but every failure traced to already-tracked, unrelated issues (#1926, #1927, and the separately-documented Stage-2 resolve_query refusal gap). route_multi's own defect count across the full validation: zero.

    Closing this issue as done. Its downstream effects (if any) will show once #1926/#1927/the Stage-2 gap are separately resolved and the matrix is re-run on a cleaner baseline.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions