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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
Pending Question State Lost on Restart
Status
Open
Summary
When vibe-remote restarts while OpenCode has a pending question, the _pending_questions in-memory state is lost. This causes subsequent user messages to be sent as new prompts instead of question answers, leaving the OpenCode session stuck.
Root Cause
_pending_questions is an in-memory dict in OpenCodeAgent that tracks pending questions per session. When vibe-remote restarts:
- This state is lost
- User messages are routed to
_process_message()instead of_process_question_answer() - New prompt is sent to OpenCode via
prompt_async() - OpenCode session remains blocked waiting for the question answer
Reproduction Steps
- Send a prompt that triggers OpenCode to ask a question
- While question is pending, restart vibe-remote
- Send any message in the same Slack thread
- Observe: message sent as new prompt, session stuck
Verified Behavior (API Test)
# With pending question, send new prompt:
- Question remains pending
- New user message added to session
- Assistant does NOT respond (session blocked)
# After answering question:
- Question cleared
- Assistant completes original flow
- New prompt treated as context, not separate request
Impact
- User's Slack conversation gets stuck
- No response from OpenCode until question is manually answered (which user cannot do after restart)
- Session effectively becomes unusable
Proposed Fix
In restore_active_polls() or _restored_poll_loop():
- Check OpenCode
/questionAPI for pending questions in the session - If found, rebuild
_pending_questionsstate with question details - Re-emit question UI to Slack (or notify user to re-trigger)
Complexity
Medium-High
- Need to fetch question details from OpenCode
- Need to reconstruct pending question payload (session_id, directory, question_id, options, etc.)
- Need Slack context to re-emit question modal
Related
- PR #24 review comment by Codex
modules/agents/opencode_agent.py:_pending_questions,restore_active_polls(),_restored_poll_loop()
Workaround
User can start a new thread to continue working with OpenCode.