Feature request: --wait-on-usage-limit flag for non-interactive / remote-control sessions

Status Open
Maintainer reply None cached
Activity 12 comments · opened Mar 31, 2026

Problem

When running Claude Code via /remote-control (e.g. from the mobile app), hitting the usage limit causes an interactive prompt to appear on the local terminal. This prompt blocks the session indefinitely and cannot be dismissed through the remote control channel.

For mobile app users, this means the session is permanently stuck until someone physically accesses the computer — there is no way to recover remotely.

Requested Feature

Add a flag (e.g. --wait-on-usage-limit) that, instead of showing an interactive prompt when the usage limit is reached, silently waits until the quota resets and then automatically continues.

claude --dangerously-skip-permissions --wait-on-usage-limit

Use Case

  • User runs Claude Code on a desktop/server with /remote-control
  • User connects and controls the session from the Claude Code mobile app
  • Usage limit is hit mid-session
  • With the current behavior: session blocks, mobile app is frozen, physical access required to recover
  • With --wait-on-usage-limit: session pauses silently, resumes automatically when quota resets, mobile app stays connected

Why This Matters

Remote control + mobile is a first-class use case. The current behavior makes unattended or long-running remote sessions impractical because a single quota hit requires physical intervention.

Workarounds Attempted

  • Wrapping in a while true restart loop — doesn't help because Claude doesn't exit on usage limit, it blocks
  • timeout wrapper — kills the process, but the mobile app cannot reconnect without re-pairing (physical access needed)
  • Redirecting stdin from /dev/null — may cause exit instead of block, but reconnection still requires physical access

None of these fully solve the problem for the mobile app remote control scenario.

View original on GitHub ↗

10 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/41503
  2. https://github.com/anthropics/claude-code/issues/13354
  3. https://github.com/anthropics/claude-code/issues/40872

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

LarsThorenWint · 5 months ago

This feature request is about hitting usage limit while using /remote-control.

kmanjt · 4 months ago

Bump, still having this problem

Matthewsre · 4 months ago

I keep hitting this issue. Was out of town for a few days and wanted to work on a project remotely. Hit usage limit the first night and didn't have a way to resume until I physically got bask to the machine.

fsc-eriker · 3 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 3 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 2 months ago

Adding a noise comment to prevent this from being closed.

fsc-eriker · 2 months ago

Adding a noise comment to prevent this from being closed.

blackstardigitalstudio · 1 month ago

This is exactly the gap I ran into too — a while true restart loop doesn't help, because Claude blocks on the limit instead of exiting, so there's nothing to restart.

I ended up building an open-source wrapper for the CLI side of this: claude-ac (https://github.com/blackstardigitalstudio/claude-auto-continue, MIT). Instead of a native flag, it wraps the Claude Code CLI, reads the output, recognizes the usage-limit message, waits for the quota to reset, and relaunches with --continue automatically — so you run claude-ac "your task" and there's no interactive prompt to get stuck on and no physical access needed to recover.

Honest caveat: since Claude doesn't emit a Stop event when credits run out, detection is done by reading the output rather than via a hook, so it's a wrapper, not a native --wait-on-usage-limit. For the desktop-app case there's also an opt-in watcher that clicks the real Resume button via UI Automation (Windows) / Accessibility (macOS) once the quota returns. No telemetry, no open ports, and it never spends money — it only clicks resume.

A native flag would still be the cleaner fix, but this has kept my long / unattended sessions from getting stuck in the meantime.

fsc-eriker · 1 month ago

Adding a noise comment to prevent this from being closed.

Showing cached comments. Read the full discussion on GitHub ↗