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(opencode): catch CancelledError to prevent /stop from bubbling errors

cyhhao25a78cf91108
diff --git a/modules/agents/opencode_agent.py b/modules/agents/opencode_agent.py
index 9863f087d..b2e650dd0 100644
--- a/modules/agents/opencode_agent.py
+++ b/modules/agents/opencode_agent.py
@@ -283,6 +283,9 @@ class OpenCodeAgent(BaseAgent):
try:
await task
+ except asyncio.CancelledError:
+ # Task was cancelled (e.g. by /stop), exit gracefully without bubbling
+ logger.debug(f"OpenCode task cancelled for {request.base_session_id}")
finally:
if self._active_requests.get(request.base_session_id) is task:
self._active_requests.pop(request.base_session_id, None)