Skip to content

Clarification: What counts as 'active commands' for idle timeout? #105

@shtefcs

Description

@shtefcs

Question

The documentation states:

"If the box sits idle with no active commands, it automatically transitions to Paused after 30 minutes."

We need clarification on what exactly counts as "active commands" / activity that resets the 30-minute idle timer:

  1. SDK API calls (e.g., `box.exec.command()`, `box.files.read()`) — do these reset the timer?
  2. Preview URL requests (e.g., `GET https://xxx-3000.preview.box.upstash.com/\`) — does HTTP traffic to the preview URL count as activity?
  3. Internal container traffic — the dev server inside the box makes internal HTTP requests (HMR, module resolution). Do these count?
  4. `box.getStatus()` or `Box.get()` — do read-only status checks reset the timer?

Why this matters

We run a health check that polls the preview URL every 30 seconds. If preview URL requests reset the idle timer, the box never auto-pauses as long as our health check runs — even if the user is completely AFK. We'd need to implement our own idle detection to pause proactively.

If preview URL requests do NOT reset the timer, the 30-minute auto-pause works as intended and we don't need custom idle detection.

Related

  • We use Upstash Box as a coding agent sandbox with a preview panel (iframe)
  • The health check ensures the preview shows current content
  • We want to minimize unnecessary compute costs for AFK users

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