Skip to content

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.

fix(realtime): scope the developer-message silence rule to configuration

rubenluetke10-beepb1de00594221
diff --git a/jarvis/plugins/realtime/codex_subscription.py b/jarvis/plugins/realtime/codex_subscription.py
index 29e42d4d35..b4ffdb059a 100644
--- a/jarvis/plugins/realtime/codex_subscription.py
+++ b/jarvis/plugins/realtime/codex_subscription.py
@@ -166,8 +166,11 @@ _THREAD_BASE_INSTRUCTIONS = (
"context. Developer messages are silent configuration, never "
"conversation: never acknowledge, answer, restate, or mention them — "
"not even with a single word like 'okay' or 'understood' — and never "
- "treat their arrival as a reason to speak. Only the user's actual "
- "speech deserves a response."
+ "treat a configuration message's arrival as a reason to speak. The ONE "
+ "exception: a developer message that opens with 'This developer message "
+ "IS a request to speak.' is a delivery order — speak its content as "
+ "your own reply, in your own voice. Every other developer message "
+ "deserves no spoken reaction; only the user's actual speech does."
)
_THREAD_DEVELOPER_INSTRUCTIONS = (
"Execution boundary: do not call tools, shell commands, applications, "
diff --git a/jarvis/realtime/session.py b/jarvis/realtime/session.py
index 90e0b5c69e..6f86153142 100644
--- a/jarvis/realtime/session.py
+++ b/jarvis/realtime/session.py
@@ -560,6 +560,16 @@ def _requires_jarvis_action(text: str) -> bool:
_DELEGATE_RESULT_MAX_CHARS = 4_000
+# The one opener the transports' developer-message silence rule names as its
+# exception: a developer message beginning with this sentence IS a delivery
+# order and must be spoken. The Codex base instructions quote it verbatim
+# (jarvis.plugins.realtime.codex_subscription._THREAD_BASE_INSTRUCTIONS); a
+# parity test pins both sides so neither can drift alone — a categorical
+# silence rule without this exception mutes announcements and late action
+# results (independent review 2026-08-05).
+SPEAK_REQUEST_OPENER = "This developer message IS a request to speak."
+
+
def _delegate_result_prompt(
text: str,
*,
@@ -598,6 +608,7 @@ def _delegate_result_prompt(
else ""
)
return (
+ f"{SPEAK_REQUEST_OPENER} "
"A trusted Jarvis action result is ready. Speak only a concise, natural "
f"rendering of the tagged result in {language_name}. {framing}Preserve "
"its exact success or failure meaning and every material fact. Say it "
@@ -621,6 +632,7 @@ def _direct_tool_result_retry_prompt(*, language: str) -> str:
"""Request speech for tool output already present in provider context."""
language_name = _LANGUAGE_NAMES.get(language, "the conversation language")
return (
+ f"{SPEAK_REQUEST_OPENER} "
"The function call for the user's current request already finished, "
"but no spoken answer was produced. Use only the function result that "
"is already present in this conversation and give the user a concise, "
@@ -1065,6 +1077,7 @@ def _external_update_prompt(text: str, *, language: str, kind: str) -> str:
"""Wrap trusted application state as data for one tool-free spoken update."""
language_name = _LANGUAGE_NAMES.get(language, "the conversation language")
return (
+ f"{SPEAK_REQUEST_OPENER} "
"A trusted internal Jarvis event is ready to be delivered to the user. "
f"Speak one brief, natural update in {language_name}. Preserve every "
"material fact, name, number, success or failure state, and uncertainty. "
diff --git a/tests/unit/realtime/test_speak_request_parity.py b/tests/unit/realtime/test_speak_request_parity.py
new file mode 100644
index 0000000000..b1c1ce1a22
--- /dev/null
+++ b/tests/unit/realtime/test_speak_request_parity.py
@@ -0,0 +1,51 @@
+"""The developer-message silence rule and the speak-request prompts must agree.
+
+The Codex base instructions tell the model that developer messages are silent
+configuration — with ONE exception, named by its exact opening sentence. Every
+prompt whose entire purpose is to be spoken (announcements, late action
+results, the direct-tool retry) must therefore open with that exact sentence,
+or the categorical silence rule mutes it: a When-Then task completes, Jarvis
+injects the announcement, and the user hears nothing (independent review
+2026-08-05, finding S1).
+"""
+
+from __future__ import annotations
+
+import jarvis.plugins.realtime.codex_subscription as codex_subscription_mod
+import jarvis.realtime.session as session_mod
+
+
+def test_base_instructions_quote_the_exact_speak_request_opener() -> None:
+ base = codex_subscription_mod._THREAD_BASE_INSTRUCTIONS
+ assert f"'{session_mod.SPEAK_REQUEST_OPENER}'" in base
+ # The rule itself must exist and stay scoped to CONFIGURATION messages.
+ assert "silent configuration" in base
+ assert "configuration message's arrival" in base
+
+
+def test_every_speak_request_prompt_opens_with_the_exception_sentence() -> None:
+ opener = session_mod.SPEAK_REQUEST_OPENER
+ prompts = (
+ session_mod._external_update_prompt(
+ "Task finished.", language="en", kind="announcement"
+ ),
+ session_mod._delegate_result_prompt(
+ "The window is open.", language="en", success=True
+ ),
+ session_mod._delegate_result_prompt(
+ "It failed.", language="en", success=False, late=True
+ ),
+ session_mod._direct_tool_result_retry_prompt(language="en"),
+ )
+ for prompt in prompts:
+ assert prompt.startswith(opener)
+
+
+def test_configuration_payloads_never_carry_the_speak_request_opener() -> None:
+ """The exception must stay reserved for genuine delivery orders."""
+ opener = session_mod.SPEAK_REQUEST_OPENER
+ assert opener not in codex_subscription_mod._language_pin_text("de")
+ assert opener not in codex_subscription_mod._THREAD_DEVELOPER_INSTRUCTIONS
+ assert opener not in session_mod._DELEGATE_ROLE_DIRECTIVE_HANDOFF
+ assert opener not in session_mod._DELEGATE_REQUIRED_DIRECTIVE
+ assert opener not in session_mod._DELEGATE_PENDING_DIRECTIVE