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(society): restore Codex model discovery

rubenluetke10-beepc6985ead56a5
diff --git a/jarvis/agent_chat/runner_cli.py b/jarvis/agent_chat/runner_cli.py
index 7e15a0016d..5e6852ae16 100644
--- a/jarvis/agent_chat/runner_cli.py
+++ b/jarvis/agent_chat/runner_cli.py
@@ -760,11 +760,13 @@ _CODEX_CATALOG = CatalogCache()
def read_codex_models(*, required_model: str = "") -> list[dict[str, Any]] | None:
- """Ask the installed CLI, never trust another client's models_cache.json."""
+ """Ask the installed CLI, never trust another client's models_cache.json.
+
+ Config-isolation flags belong to ``codex exec`` and are not accepted by
+ ``codex app-server``. Discovery only reads model/list; it starts no turn.
+ """
env = _account_env("codex")
argv = codex_argv_prefix()
- if _CATALOG_IGNORE_CONFIG.get():
- argv = [*argv, "--ignore-user-config", "--ignore-rules"]
cwd = _catalog_cwd()
rows = _CODEX_CATALOG.read(
catalog_key(argv, env, cwd),
diff --git a/tests/unit/agent_chat/test_agent_chat_ladders.py b/tests/unit/agent_chat/test_agent_chat_ladders.py
index 4ad70ddf1a..3489822f76 100644
--- a/tests/unit/agent_chat/test_agent_chat_ladders.py
+++ b/tests/unit/agent_chat/test_agent_chat_ladders.py
@@ -483,6 +483,10 @@ def test_read_codex_models_uses_the_executing_cli_not_a_foreign_cache(monkeypatc
assert [row["id"] for row in rows] == ["future-supported-model"]
assert calls == [(["codex-test"], {"CODEX_HOME": str(home)})]
assert runner_cli.read_codex_models() == rows
+ # Society discovery is scoped for exec isolation. The read-only app-server
+ # must still receive only flags that its own subcommand accepts.
+ with runner_cli.cli_catalog_scope(ignore_user_config=True):
+ assert runner_cli.read_codex_models() == rows
assert len(calls) == 1