Problem
When the iOS app is moved to the background during an active chat session, it times out and displays an error when returning to the foreground.
Expected Behavior
- iOS app should gracefully handle backgrounding during active agent responses
- On return to foreground, either:
- Resume the conversation seamlessly
- Show the completed response that finished while backgrounded
- Allow reconnection without error state
Actual Behavior
- User sends message or agent is responding
- User switches to another app or locks device
- On return to Goose app: timeout error displayed
- Conversation state may be lost or require retry
Impact
- Disrupts natural mobile usage patterns (multitasking, notifications, etc.)
- Forces users to stay in-app for entire conversation duration
- Poor UX for longer agent tasks that complete in background
Suggested Fix
- Background task handling: Continue agent execution in background with iOS background task API
- Reconnection logic: Detect foreground return and reconnect to ongoing task
- Timeout tolerance: Increase timeout threshold or make it configurable
- Push notifications: Notify user when background task completes
- State persistence: Save conversation state before backgrounding
Reproduction Steps
- Open iOS app and start a chat
- Send a message that triggers agent processing
- Immediately switch to another app or lock device
- Wait 30+ seconds
- Return to Goose app
- Observe: timeout error displayed
Environment
- iOS app version: [current]
- Expected: Mobile apps should handle backgrounding gracefully
Problem
When the iOS app is moved to the background during an active chat session, it times out and displays an error when returning to the foreground.
Expected Behavior
Actual Behavior
Impact
Suggested Fix
Reproduction Steps
Environment