Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(claude): keep default bundled cli fallback

cyh0dbc15ab83c8
diff --git a/core/handlers/session_handler.py b/core/handlers/session_handler.py
index bfd2a42e1..d475357fe 100644
--- a/core/handlers/session_handler.py
+++ b/core/handlers/session_handler.py
@@ -63,13 +63,10 @@ class SessionHandler(BaseHandler):
if not normalized:
return None
- expanded = os.path.expanduser(normalized)
if normalized == "claude":
- from vibe.api import resolve_cli_path
-
- return resolve_cli_path(normalized)
+ return None
- return expanded
+ return os.path.expanduser(normalized)
def _load_agent_file(self, agent_name: str, working_path: str) -> Optional[Dict[str, Any]]:
"""Load an agent file and return its parsed content.
diff --git a/tests/test_claude_cli_path.py b/tests/test_claude_cli_path.py
index 2203f47ea..c425a7749 100644
--- a/tests/test_claude_cli_path.py
+++ b/tests/test_claude_cli_path.py
@@ -9,7 +9,6 @@ from typing import Any
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import core.handlers.session_handler as session_handler_module
-import vibe.api as vibe_api
from config.v2_compat import to_app_config
from config.v2_config import AgentsConfig, ClaudeConfig, RuntimeConfig, SlackConfig, V2Config
from core.handlers.session_handler import SessionHandler
@@ -125,7 +124,6 @@ def test_session_handler_keeps_sdk_default_for_default_claude_binary(monkeypatch
captured["connected"] = True
monkeypatch.setattr(session_handler_module, "ClaudeSDKClient", _StubClaudeSDKClient)
- monkeypatch.setattr(vibe_api, "resolve_cli_path", lambda binary: None)
controller = _Controller(tmp_path)
controller.config.claude.cli_path = "claude"
@@ -138,7 +136,7 @@ def test_session_handler_keeps_sdk_default_for_default_claude_binary(monkeypatch
assert captured["options"].cli_path is None
-def test_session_handler_uses_resolved_path_for_claude_binary(monkeypatch, tmp_path: Path) -> None:
+def test_session_handler_passes_non_default_claude_command_name(monkeypatch, tmp_path: Path) -> None:
captured: dict[str, Any] = {}
class _StubClaudeSDKClient:
@@ -148,20 +146,17 @@ def test_session_handler_uses_resolved_path_for_claude_binary(monkeypatch, tmp_p
async def connect(self) -> None:
captured["connected"] = True
- resolved_path = "/opt/homebrew/bin/claude"
-
monkeypatch.setattr(session_handler_module, "ClaudeSDKClient", _StubClaudeSDKClient)
- monkeypatch.setattr(vibe_api, "resolve_cli_path", lambda binary: resolved_path)
controller = _Controller(tmp_path)
- controller.config.claude.cli_path = "claude"
+ controller.config.claude.cli_path = "claude-proxy"
handler = SessionHandler(controller)
context = MessageContext(user_id="U123", channel_id="C123")
_run_session(handler, context)
assert captured["connected"] is True
- assert captured["options"].cli_path == resolved_path
+ assert captured["options"].cli_path == "claude-proxy"
def test_session_handler_expands_tilde_in_claude_cli_path(monkeypatch, tmp_path: Path) -> None: