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(brain): a reported 'it spawned' is not a delegation request
rubenluetke10-beepc8b4b8d1d70b
diff --git a/jarvis/brain/spawn_gate.py b/jarvis/brain/spawn_gate.pyindex 02053ca627..71ca0138ed 100644--- a/jarvis/brain/spawn_gate.py+++ b/jarvis/brain/spawn_gate.py@@ -67,6 +67,33 @@ _DELEGATION_MARKER_RE: re.Pattern[str] = re.compile(re.IGNORECASE,)+# A vehicle word that REPORTS what already happened is not a delegation+# request. "It spawned on my other screen, but no problem — could you please+# prompt terminal t1 …" (live 2026-08-06 18:51) carried 'spawned' three words+# in, so the workspace stand-down read a comment about the window that had+# just opened as an order for a background agent, and the deterministic+# fast path refused to type into the very pane the sentence addressed. The+# shape is deliberately narrow — a subject pronoun directly in front of the+# simple past — because a genuine request is imperative and has no such+# subject ("spawn an agent that …", "Alex should spawn sub-agents" both+# stay markers).+_REPORTED_VEHICLE_RE: re.Pattern[str] = re.compile(+ r"\b(?:it|that|this|which|one|es|das|der|die)\s+" # i18n-allow: spoken-input vocabulary, de/en subjects+ r"(?:just\s+|gerade\s+)?" # i18n-allow: spoken-input vocabulary+ r"(?:spawned|delegated)\b",+ re.IGNORECASE,+)+++def _marker_spans(text: str) -> list[tuple[int, int]]:+ """Delegation-marker spans, with reported (past-tense) mentions dropped."""+ reported = [m.span() for m in _REPORTED_VEHICLE_RE.finditer(text)]+ return [+ match.span()+ for match in _DELEGATION_MARKER_RE.finditer(text)+ if not any(start <= match.start() < end for start, end in reported)+ ]+# A delegation offer's confirmation is a SHORT stand-alone yes ("Ja, mach# das", "yes go ahead"). ``classify_response`` substring-matches, so a long@@ -182,7 +209,7 @@ def names_spawn_vehicle(user_text: str) -> bool:for a background agent. Sharing the one pattern keeps "spawn an agent thathelps Kai" a spawn while "let Kai do it" reaches Kai."""- return bool(_DELEGATION_MARKER_RE.search((user_text or "").strip()))+ return bool(_marker_spans((user_text or "").strip()))def spawn_vehicle_spans(user_text: str) -> list[tuple[int, int]]:@@ -195,10 +222,7 @@ def spawn_vehicle_spans(user_text: str) -> list[tuple[int, int]]:sub-agents" (a description of Alex's work, vehicle word behind thecall-sign). Both share this ONE pattern so the two answers cannot drift."""- return [- (match.start(), match.end())- for match in _DELEGATION_MARKER_RE.finditer((user_text or "").strip())- ]+ return _marker_spans((user_text or "").strip())def addressed_pane_blocks_spawn(user_text: str) -> bool:@@ -259,7 +283,7 @@ def llm_spawn_allowed(user_text: str) -> bool:"the workspace handles this turn, no background agent")return False- if _DELEGATION_MARKER_RE.search(text):+ if _marker_spans(text):OFFER_WINDOW.disarm()return Trueif OFFER_WINDOW.consume_confirm(text):diff --git a/tests/unit/agentic_ide/test_coding_mode_spawn_gate.py b/tests/unit/agentic_ide/test_coding_mode_spawn_gate.pyindex 10605bb849..29b7a6b0a2 100644--- a/tests/unit/agentic_ide/test_coding_mode_spawn_gate.py+++ b/tests/unit/agentic_ide/test_coding_mode_spawn_gate.py@@ -148,6 +148,27 @@ def test_pane_told_to_fan_out_keeps_the_turn_in_english() -> None:assert spawn_vehicle_outranks_workspace(text, names=PANES) is False+def test_a_report_about_a_spawned_window_does_not_outrank_the_pane() -> None:+ """The live 2026-08-06 18:51 turn: 'spawned' reports, it does not request.++ "It spawned on my other screen" comments on the window that had just+ opened; the instruction addresses t1. The word-order tie-breaker cannot+ save this shape — the past-tense report stands BEFORE the call-sign — so+ the reported mention must not count as naming the vehicle at all.+ Reading it as one made the deterministic fast path refuse to type into+ the very pane the sentence addressed, and the turn took a 5 s router+ detour it never came back from.+ """+ text = (+ "It spawned on my other screen, but no problem. Could you please "+ "prompt terminal t1 to do a deep dive and look for bugs related "+ "on macOS?"+ )+ panes = ["T1", "T2", "T3"]+ assert spawn_vehicle_outranks_workspace(text, names=panes) is False+ assert owns_turn(text, names=panes) is True++async def test_addressed_pane_blocks_the_llm_spawn(wired: Registry, tmp_path: Path) -> None: