Skip to content

iOS app times out and errors when moved to background during active chat #8490

@jaburges

Description

@jaburges

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

  1. Background task handling: Continue agent execution in background with iOS background task API
  2. Reconnection logic: Detect foreground return and reconnect to ongoing task
  3. Timeout tolerance: Increase timeout threshold or make it configurable
  4. Push notifications: Notify user when background task completes
  5. State persistence: Save conversation state before backgrounding

Reproduction Steps

  1. Open iOS app and start a chat
  2. Send a message that triggers agent processing
  3. Immediately switch to another app or lock device
  4. Wait 30+ seconds
  5. Return to Goose app
  6. Observe: timeout error displayed

Environment

  • iOS app version: [current]
  • Expected: Mobile apps should handle backgrounding gracefully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions