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(ide): stop Claude Code panes from jumping on every click
rubenluetke10-beepd18c5157cc39
diff --git a/jarvis/workspace/agents.py b/jarvis/workspace/agents.pyindex ba2ac0405b..ba28a30b17 100644--- a/jarvis/workspace/agents.py+++ b/jarvis/workspace/agents.py@@ -765,6 +765,14 @@ _AGENTS: dict[str, WorkspaceAgent] = {# hint rows. The key-hint half of the footer already matches the shared# "shift+tab" fragment.chrome_fragments=("πΏ", "tip: use"),+ # Clicks stay with the pane. With its fullscreen renderer on (a user's+ # ``CLAUDE_CODE_NO_FLICKER``) the CLI captures every click and pointer+ # move: hovering highlights blocks, a click expands or collapses tool+ # output and starts its own selection, and each of those re-lays the+ # whole screen out β the pane jumped and resized under every click in+ # the IDE (reported 2026-09-28). This keeps wheel scrolling and drops+ # click and motion capture; it changes nothing outside that renderer.+ spawn_env=(("CLAUDE_CODE_DISABLE_MOUSE_CLICKS", "1"),),spoken_aliases=("claude", "cloude", "claud", "clode", "klaude", "kloude"),spoken_aliases_needing_suffix=("cloud",@@ -931,6 +939,8 @@ _AGENTS: dict[str, WorkspaceAgent] = {instruction_filename="CLAUDE.md",# Resolved fresh on every spawn AND every resume β see the docstring.spawn_env_factory=glm_spawn_env,+ # Same binary, same click capture β see the Claude Code entry.+ spawn_env=(("CLAUDE_CODE_DISABLE_MOUSE_CLICKS", "1"),),spoken_aliases=("glm", "g l m", "gee ell em", "jlm"),),"grok-build": make_cli_agent(diff --git a/tests/unit/agentic_ide/test_account_spawn.py b/tests/unit/agentic_ide/test_account_spawn.pyindex 4e65748c7d..bbbcd4898c 100644--- a/tests/unit/agentic_ide/test_account_spawn.py+++ b/tests/unit/agentic_ide/test_account_spawn.py@@ -14,6 +14,7 @@ prevents that, and it is pinned down here.from __future__ import annotationsimport asyncio+import osimport threadingfrom pathlib import Path@@ -23,6 +24,7 @@ from jarvis import agent_accountsfrom jarvis.agentic_ide import layout_treefrom jarvis.agentic_ide import session as session_modfrom jarvis.agentic_ide.session import Registry, SessionError+from jarvis.workspace import agents as workspace_agentsfrom tests.fakes.fake_pty_manager import FakePtyManager@@ -344,16 +346,34 @@ async def test_a_pane_on_an_added_account_spawns_with_that_config_dir(async def test_a_pane_on_the_builtin_account_spawns_exactly_as_it_always_did(registry: Registry, fake_pty: FakePtyManager, tmp_path: Path) -> None:- """No environment is passed at all β plain inheritance, byte for byte.+ """The machine's own environment, with no account redirection in it.This is the promise to everyone who never opens the switcher: adding the- feature changed nothing about how their panes start. Read together with- ``_launched_from_a_plain_shell`` above, which is what makes "at all" a+ feature changed nothing about how their panes start. The one addition is the+ entry's fixed pane setting (click capture off, see the Claude Code entry),+ which every pane of that CLI carries whatever its account. Read together+ with ``_launched_from_a_plain_shell`` above, which is what makes this astatement about this code rather than about the terminal running the suite."""await registry.start(str(tmp_path), [{"agent": "claude"}])await _attach(registry, registry.session.terminals[0].name)- assert _env_of(fake_pty) is None+ env = _env_of(fake_pty)+ assert env is not None+ assert env == {**os.environ, "CLAUDE_CODE_DISABLE_MOUSE_CLICKS": "1"}++[email protected]("agent", ["claude", "glm"])+def test_a_claude_code_pane_keeps_clicks_out_of_the_cli(agent: str) -> None:+ """Clicking a pane must not re-lay the agent's screen out.++ Claude Code's fullscreen renderer otherwise captures every click and pointer+ move β hover highlights, click-to-expand, its own selection β and each one+ redraws the whole pane, which read as the terminal jumping and resizing+ under every click in the IDE. Wheel scrolling stays with the CLI.+ """+ spec = workspace_agents.get_agent(agent)+ assert spec is not None+ assert ("CLAUDE_CODE_DISABLE_MOUSE_CLICKS", "1") in spec.spawn_envasync def test_the_spawn_environment_keeps_PATH(@@ -537,8 +557,9 @@ async def test_two_panes_can_run_two_different_subscriptions_at_once(for term in registry.session.terminals:await _attach(registry, term.name)first_env, second_env = _env_of(fake_pty, 0), _env_of(fake_pty, 1)- # The default pane inherits untouched; the second is pinned to its own seat.- assert first_env is None+ # The default pane carries no seat; the second is pinned to its own.+ assert first_env is not None+ assert first_env.get("CLAUDE_CONFIG_DIR") == os.environ.get("CLAUDE_CONFIG_DIR")assert second_env is not Noneassert second_env["CLAUDE_CONFIG_DIR"] == str(second.config_dir)diff --git a/tests/unit/agentic_ide/test_new_cli_providers.py b/tests/unit/agentic_ide/test_new_cli_providers.pyindex e104850210..196289e469 100644--- a/tests/unit/agentic_ide/test_new_cli_providers.py+++ b/tests/unit/agentic_ide/test_new_cli_providers.py@@ -534,8 +534,9 @@ def test_a_configured_glm_pane_carries_the_endpoint_and_hides_a_stray_key(# Empty means "remove from the child": a host key would otherwise outrank# the token and the pane would quietly answer from the other vendor.assert overlay["ANTHROPIC_API_KEY"] == ""- # A plain Claude Code pane in the same workspace is untouched.- assert ide_session.agent_spawn_overlay("claude") == {}+ # A plain Claude Code pane in the same workspace gets none of the vendor+ # switch β only the pane setting every Claude Code pane carries.+ assert ide_session.agent_spawn_overlay("claude") == {"CLAUDE_CODE_DISABLE_MOUSE_CLICKS": "1"}def _stub_pane(agent: str) -> Any:@@ -587,7 +588,7 @@ def test_the_environment_reaches_a_pane_through_the_real_spawn_path(assert kimi_env is not Noneassert kimi_env["KIMI_CODE_NO_AUTO_UPDATE"] == "1"- # A CLI that declares nothing still inherits the machine's environment+ # A CLI that declares nothing (a plain shell) still inherits the machine's environment# untouched β the behaviour every pane had before any of this existed. True of# an app started from a plain terminal; one started from a coding-agent# session strips that session's markers instead (test_parent_session_env), so@@ -595,7 +596,7 @@ def test_the_environment_reaches_a_pane_through_the_real_spawn_path(# whether this passes.for marker in ide_session.PARENT_AGENT_SESSION_VARS:monkeypatch.delenv(marker, raising=False)- assert registry._prepare_spawn(_stub_pane("claude"), str(tmp_path)) is None+ assert registry._prepare_spawn(_stub_pane("shell"), str(tmp_path)) is Nonedef test_an_unconfigured_glm_pane_refuses_on_the_real_spawn_path(