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): always use agent-specific key for session storage

cyhhao0e33e6582d3e
diff --git a/core/handlers/session_handler.py b/core/handlers/session_handler.py
index 0563316a9..2d6b96cc4 100644
--- a/core/handlers/session_handler.py
+++ b/core/handlers/session_handler.py
@@ -119,15 +119,12 @@ class SessionHandler:
"Using Claude subagent session for %s at %s", cached_base, working_path
)
return self.claude_sessions[cached_key]
+ # Always use agent-specific key when effective_agent is set
+ # This ensures session continuity even on first use
+ composite_key = cached_key
+ base_session_id = cached_base
if cached_session_id:
stored_claude_session_id = cached_session_id
- composite_key = cached_key
- base_session_id = cached_base
- if composite_key in self.claude_sessions:
- logger.info(
- "Using Claude subagent session for %s at %s", cached_base, working_path
- )
- return self.claude_sessions[composite_key]
# Ensure working directory exists
if not os.path.exists(working_path):