Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(spawn): a leading "No," answers the offer, it does not refuse the worker
rubenluetke10-beeped1dd9c0e2aa
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.pyindex fe89fe3c41..89b71c33b8 100644--- a/jarvis/brain/manager.py+++ b/jarvis/brain/manager.py@@ -1180,6 +1180,26 @@ _SPAWN_DECLINE_RE = re.compile()+# A leading "No," answers the ASSISTANT'S last proposal; it does not negate the+# vehicle named after it. English collapses two German words into one — "kein"+# (negates the noun) and "nein" (contradicts the previous statement) are both+# "no" — and ``_SPAWN_DECLINE_RE``'s char-window arm reads either as the first.+# Live bug 2026-08-24 (voice session 10:24, Turn 4): Jarvis offered to do the+# job inline, the user corrected him with "No, no, a worker should do it." and+# the gate scored that explicit delegation ORDER as a decline — the exact+# opposite — so the third spawn request in a row was refused. The German arms+# were never affected because they key on "kein/nicht/ohne/niemals", never on+# "nein". Stripped only when the particle is punctuated off ("No, …"), which is+# what makes it a reply rather than a determiner: "No subagent please" has no+# comma, keeps its window, and still declines. Any real negation that follows+# ("No, do not spawn …", "No, no subagent!") matches on its own merits after+# the strip. Pure regex (AP-11).+_CONTRADICTION_LEAD_RE = re.compile(+ r"^(?:\s*(?:no|nope|nah|nein|nee|noe)\s*[,;:]+)+\s*", # i18n-allow: spoken input+ re.IGNORECASE,+)++def _is_spawn_decline(user_text: str) -> bool:"""True when the user explicitly declines a worker spawn — "don't spawn asubagent", "no sub-agent", "talk to me directly". Must override the@@ -1187,9 +1207,12 @@ def _is_spawn_decline(user_text: str) -> bool:See ``_SPAWN_DECLINE_RE`` for the full rationale (live bug 2026-06-19,Turn 2): an explicit decline that NAMES the vehicle ("Subagent"/"spawn")- must never be read as a spawn request.+ must never be read as a spawn request. A leading contradiction particle is+ dropped first — see ``_CONTRADICTION_LEAD_RE`` (live bug 2026-08-24)."""- return bool(_SPAWN_DECLINE_RE.search(user_text or ""))+ return bool(+ _SPAWN_DECLINE_RE.search(_CONTRADICTION_LEAD_RE.sub("", user_text or ""))+ )# The user NAMING the auto-spawn *feature* — talking about it, complaining aboutdiff --git a/tests/unit/brain/test_spawn_gate.py b/tests/unit/brain/test_spawn_gate.pyindex a10c60f1e5..6f0f31f2e1 100644--- a/tests/unit/brain/test_spawn_gate.py+++ b/tests/unit/brain/test_spawn_gate.py@@ -85,6 +85,47 @@ def test_spawn_decline_blocks_even_though_it_names_the_vehicle() -> None:)+ "utterance",+ [+ # voice-session 2026-08-24 10:24 Turn 4 — the user CORRECTS the+ # assistant's offer to do the job inline. "No" answers that offer;+ # "worker" is the vehicle he wants, not one he refuses.+ "No, no, which a worker should do it.",+ "No, no, a worker should do it.",+ # the same shape without the stutter, and the positive command form+ "No, do it with a subagent.",+ "No, I want an agent for this.",+ # German never had the bug ("nein" ≠ "kein") — pinned so it stays so+ "Nein, nein, ein Worker soll das machen.", # i18n-allow: DE live turn+ ],+)+def test_leading_contradiction_is_not_a_spawn_decline(utterance: str) -> None:+ """A "No," that answers the assistant's offer must not read as "no worker".++ English collapses German "kein" (negates the noun) and "nein"+ (contradicts the statement) into one word, and the decline regex's+ char-window read either as the first. Live: the user asked for a worker+ three turns running and was refused every time.+ """+ assert llm_spawn_allowed(utterance) is True+++ "utterance",+ [+ "No subagent please, just talk to me.",+ "No, no subagent!",+ "No, do not spawn a subagent, talk to me directly.",+ "No, I don't want a subagent.",+ "No uses un subagente.", # i18n-allow: ES decline+ ],+)+def test_real_declines_survive_the_contradiction_strip(utterance: str) -> None:+ """Dropping the leading particle must not disarm an actual refusal."""+ assert llm_spawn_allowed(utterance) is False++def test_auto_spawn_feature_complaint_blocks() -> None:assert (llm_spawn_allowed(