fix: re-fetch messages when control returns to mobile#263
Merged
bra1nDump merged 1 commit intoslopus:mainfrom Dec 6, 2025
Merged
fix: re-fetch messages when control returns to mobile#263bra1nDump merged 1 commit intoslopus:mainfrom
bra1nDump merged 1 commit intoslopus:mainfrom
Conversation
When a session switches from local mode (desktop control) back to remote mode (mobile control), automatically re-fetch messages to catch up on any messages that were exchanged while the desktop had control. This addresses the issue where starting a session from mobile, then continuing from desktop, would leave mobile without the new messages. When the user switches back to mobile control, messages are now synced. Fixes slopus#261 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
3 tasks
3 tasks
JoeLuker
pushed a commit
to JoeLuker/happy
that referenced
this pull request
Feb 1, 2026
When a session switches from local mode (desktop control) back to remote mode (mobile control), automatically re-fetch messages to catch up on any messages that were exchanged while the desktop had control. This addresses the issue where starting a session from mobile, then continuing from desktop, would leave mobile without the new messages. When the user switches back to mobile control, messages are now synced. Fixes slopus#261 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a session is started from mobile and the user continues from desktop (by pressing a key), the CLI switches to local mode and stops syncing messages. This PR ensures that when control returns to mobile, messages are automatically re-fetched to catch up.
The Problem
controlledByUser: true)controlledByUser: false)The Fix
Detects when
controlledByUsertransitions fromfalse→truein theupdate-sessionhandler, and triggers a message re-fetch viaonSessionVisible().Limitations
This only helps when the CLI syncs the messages to the server before switching back to remote mode. If messages were never synced during local mode, they won't appear on mobile. That would require a CLI-side change to sync message history on mode switch.
Test plan
yarn typecheck)Fixes #261
🤖 Generated with Claude Code