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(agentic-ide): honour the schema default the model was promised
Ruben Lütkee201192a5db3
diff --git a/docs/commands-reference.md b/docs/commands-reference.mdindex 3bf79625a9..6b0ec785bb 100644--- a/docs/commands-reference.md+++ b/docs/commands-reference.md@@ -263,7 +263,7 @@ Read what the coding agent in a named terminal is doing — its status and its r## `agentic-ide-prompt` — Prompt an Agentic-IDE terminal-Send an instruction to the coding agent in a named terminal. Use this whenever the user tells a terminal to do something ('tell Kai to ...', 'Mika soll ...', 'let Nova refactor ...') — that work belongs to that agent, never to a background worker. Pass the user's instruction as the prompt; with compose=true it is rewritten into a briefed task with the relevant files of this workspace attached. CHECK THE REPLY: it carries a 'submitted' flag. True means the agent accepted the prompt and started. False means the text is only sitting in that terminal's input box — say so plainly and name the terminal, never report it as done.+Send an instruction to the coding agent in a named terminal. Use this whenever the user tells a terminal to do something ('tell Kai to ...', 'Mika soll ...', 'let Nova refactor ...') — that work belongs to that agent, never to a background worker. Pass the instruction in the USER's words: everything they asked for, every constraint and file they named, nothing invented and nothing summarised away. Do NOT write the brief yourself — a prompt writer that has read this repository turns what you pass into a briefed task with the relevant files attached, and a headline you composed instead arrives at the agent as its whole assignment. Only ever names a terminal that is ALREADY running: if the call fails with 'no terminal called …', opening a pane will not create that name — use 'agentic-ide-fanout' with spawn to open and brief one in a single step, and never repeat the spawn. CHECK THE REPLY: it carries a 'submitted' flag. True means the agent accepted the prompt and started. False means the text is only sitting in that terminal's input box — say so plainly and name the terminal, never report it as done.- **Endpoint:** `POST /api/agentic-ide/terminals/{name}/prompt`- **Arguments:** `name` (string; required); `prompt` (string; required); `compose` (boolean; optional)diff --git a/jarvis/agentic_ide/context.py b/jarvis/agentic_ide/context.pyindex a1d2c34597..b99da70e9d 100644--- a/jarvis/agentic_ide/context.py+++ b/jarvis/agentic_ide/context.py@@ -49,14 +49,24 @@ _HEADER = ("the agentic-ide-prompt function. That is the whole point of this mode. ""NEVER spawn a background agent for work aimed at a terminal, and never ""answer with what you WOULD have sent — send it.\n"- "- Turn what the user said into a prompt worth running: state the task "- "precisely, keep every constraint they gave, invent none, and point at the "- "relevant files with @path references from this repository. A vague spoken "- "sentence becomes a briefed task; that is the value you add here.\n"+ "- Hand the work over in the USER's words — everything they asked for, "+ "every constraint and file they named, nothing invented and nothing "+ "summarised away. Do not write the brief yourself: a prompt writer that "+ "has read this repository turns what you pass on into the briefed task "+ "with @path references, and a one-line headline you composed instead "+ "REPLACES that knowledge of the code with your guess at it. Passing the "+ "instruction along whole is the value you add here.\n""- When the user asks what an agent is doing, read it with ""agentic-ide-terminal-report and answer from what that terminal actually ""printed. Never guess, never take a screenshot — the terminals are readable ""directly.\n"+ "- NEVER claim you sent, forwarded, passed on or told a terminal anything "+ "unless a function call in THIS turn actually did it. Saying \"I have let "+ "Alex know\" while nothing reached Alex is the worst failure this mode has: "+ "the user walks away believing an agent is working, and only finds the idle "+ "terminal later. If the work did not go out, say plainly that it did not and "+ "why — an honest \"I could not reach that terminal\" is always better than a "+ "confident sentence that turns out to be false.\n""- Brainstorming, architecture, and 'what should we do next' are answered ""inline, against this codebase, and you may propose which terminal should ""take which part.\n"diff --git a/jarvis/commands/registry.py b/jarvis/commands/registry.pyindex 1d5ae52054..5045addaea 100644--- a/jarvis/commands/registry.py+++ b/jarvis/commands/registry.py@@ -665,9 +665,17 @@ def _build_registry() -> tuple[AppCommand, ...]:"Use this whenever the user tells a terminal to do something ""('tell Kai to ...', 'Mika soll ...', 'let Nova refactor ...') ""— that work belongs to that agent, never to a background "- "worker. Pass the user's instruction as the prompt; with "- "compose=true it is rewritten into a briefed task with the "- "relevant files of this workspace attached. "+ "worker. Pass the instruction in the USER's words: everything "+ "they asked for, every constraint and file they named, nothing "+ "invented and nothing summarised away. Do NOT write the brief "+ "yourself — a prompt writer that has read this repository turns "+ "what you pass into a briefed task with the relevant files "+ "attached, and a headline you composed instead arrives at the "+ "agent as its whole assignment. "+ "Only ever names a terminal that is ALREADY running: if the "+ "call fails with 'no terminal called …', opening a pane will not "+ "create that name — use 'agentic-ide-fanout' with spawn to open "+ "and brief one in a single step, and never repeat the spawn. ""CHECK THE REPLY: it carries a 'submitted' flag. True means the ""agent accepted the prompt and started. False means the text is ""only sitting in that terminal's input box — say so plainly and "@@ -691,9 +699,12 @@ def _build_registry() -> tuple[AppCommand, ...]:"type": "boolean","default": True,"description": (- "Rewrite a spoken/rough instruction into a precise "- "prompt and attach @file references before sending. "- "Set false only to send text through verbatim."+ "Leave this out. On by default: the instruction is "+ "rewritten into a briefed task with this "+ "workspace's files attached, which is what makes a "+ "spoken sentence worth running. Set it false ONLY "+ "for a literal keystroke that must reach the agent "+ "unchanged, such as 'continue' or 'yes'."),},},diff --git a/jarvis/plugins/tool/app_command.py b/jarvis/plugins/tool/app_command.pyindex a5c3f72937..6cdee408ea 100644--- a/jarvis/plugins/tool/app_command.py+++ b/jarvis/plugins/tool/app_command.py@@ -41,6 +41,37 @@ _TYPE_CHECKS: dict[str, type | tuple[type, ...]] = {}+def _with_defaults(schema: dict[str, Any], args: dict[str, Any]) -> dict[str, Any]:+ """``args`` plus every schema default the caller left out.++ A ``default`` in a tool schema is a promise made to the model. It reads+ "compose — rewrite the instruction into a briefed task, default true",+ leaves the argument out because that is what a default is FOR, and expects+ the documented behaviour. Nothing kept that promise: the arguments went to+ the endpoint exactly as the model sent them, and the endpoint then applied+ ITS own default — which is chosen for the surface that calls it directly,+ not for the model reading the registry.++ Measured live 2026-07-27 18:47: ``agentic-ide-prompt`` declares+ ``compose: true`` while ``PromptRequest.compose`` defaults to False for the+ typed prompt bar, which sends what someone wrote by hand and must not have+ it rewritten. So every spoken instruction the router forwarded was typed+ into the coding agent verbatim — a one-line paraphrase where a briefed task+ with the workspace's files attached was the entire point of that path. The+ same shape sits behind every other default in the registry, so this is+ fixed once, here, rather than per command.+ """+ props = (schema or {}).get("properties", {})+ if not isinstance(props, dict):+ return dict(args)+ filled = dict(args)+ for key, spec in props.items():+ if key in filled or not isinstance(spec, dict) or "default" not in spec:+ continue+ filled[key] = spec["default"]+ return filled++def _validate_args(schema: dict[str, Any], args: dict[str, Any]) -> list[str]:"""Minimal, dependency-free JSON-schema check: unknown keys, required,enum membership, primitive types, string length, numeric range."""@@ -189,7 +220,7 @@ class RegistryCommandTool:async def execute(self, args: dict[str, Any], ctx: Any) -> ToolResult:cmd = self._cmd- cmd_args = dict(args or {})+ cmd_args = _with_defaults(cmd.params, args or {})problems = _validate_args(cmd.params, cmd_args)if problems:return ToolResult(diff --git a/tests/unit/plugins/tool/test_app_command.py b/tests/unit/plugins/tool/test_app_command.pyindex da84d279e6..ce39d24f16 100644--- a/tests/unit/plugins/tool/test_app_command.py+++ b/tests/unit/plugins/tool/test_app_command.py@@ -13,7 +13,11 @@ import httpxfrom fastapi import FastAPI, HTTPExceptionfrom jarvis.commands.registry import get_registry-from jarvis.plugins.tool.app_command import AppCommandTool, _validate_args+from jarvis.plugins.tool.app_command import (+ AppCommandTool,+ _validate_args,+ _with_defaults,+)def _fake_app(calls: dict) -> FastAPI:@@ -40,6 +44,11 @@ def _fake_app(calls: dict) -> FastAPI:async def tts_switch(body: dict) -> dict:raise HTTPException(status_code=409, detail="no key stored")+ @app.post("/api/agentic-ide/terminals/{name}/prompt")+ async def terminal_prompt(name: str, body: dict) -> dict:+ calls["terminal_prompt"] = {"name": name, **body}+ return {"ok": True, "terminal": name, "submitted": True}+return app@@ -138,6 +147,55 @@ async def test_no_server_available_is_honest() -> None:assert "not available" in (result.error or "")+async def test_schema_default_is_sent_when_the_model_leaves_it_out() -> None:+ """The live 2026-07-27 18:47 failure, pinned.++ ``agentic-ide-prompt`` declares ``compose: true``; the endpoint behind it+ defaults to False because its other caller is the typed prompt bar, which+ must send a hand-written prompt untouched. A model that reads the default+ and omits the argument therefore got the OPPOSITE of what the schema+ promised: its one-line paraphrase was typed into the coding agent as the+ whole assignment, instead of being composed into a briefed task with this+ workspace's files attached.+ """+ calls: dict = {}+ result = await _tools(calls)["agentic-ide-prompt"].execute(+ {"name": "Casey", "prompt": "have a look at the macOS paths"}, None+ )+ assert result.success is True+ assert calls["terminal_prompt"]["compose"] is True+++async def test_an_explicit_argument_still_beats_the_default() -> None:+ """A default is a fallback, never an override — "continue" stays verbatim."""+ calls: dict = {}+ await _tools(calls)["agentic-ide-prompt"].execute(+ {"name": "Casey", "prompt": "continue", "compose": False}, None+ )+ assert calls["terminal_prompt"]["compose"] is False+++def test_every_registry_default_survives_into_the_payload() -> None:+ """Whatever the registry promises the model is what the endpoint receives.++ Generic on purpose: the compose bug was one instance of a class, and the+ next default added to the registry gets the same guarantee without anyone+ having to remember this test exists.+ """+ for cmd in get_registry():+ props = (cmd.params or {}).get("properties", {})+ promised = {+ key: spec["default"]+ for key, spec in props.items()+ if isinstance(spec, dict) and "default" in spec+ }+ if not promised:+ continue+ filled = _with_defaults(cmd.params, {})+ for key, value in promised.items():+ assert filled[key] == value, f"{cmd.id}: default for {key!r} was dropped"++def test_validator_covers_types_and_ranges() -> None:schema = {"type": "object",