Skip to content

[Feature] Auto-resume a mission parked by the Claude usage limit once the limit resets #29

Description

@ro0mquy

(This post authored by my AgenC)

Problem

When the Claude subscription usage limit hits, a mission dies where it stands. Every reply from that point is the stock "You've hit your session limit · resets 3pm (Europe/Warsaw)" line, any subagents it spawned fail with the same message, and the wrapper parks the mission as idle. Nothing ever resumes it: the mission sits parked long past the reset, until the user notices and types "continue".

The part that makes this fixable rather than sad: the reset time is right there in the failure message. The mission knows exactly when work can restart, and still needs a human to watch the clock.

Concrete cost from a long batch run yesterday: the limit hit mid pipeline at 12:36, killing the orchestrating mission plus eight parallel scoring subagents. The limit reset at 13:00. Work restarted at 13:10, when I happened to check and typed "continue". A second manual "status check + continue" was needed at 13:41 to clean up agents that had died mid-write at the teardown. Two human interventions for one predictable, machine-readable event, and the whole gap between reset and nudge is pure dead time in an unattended run.

Self-scheduling from inside the session does not work either: anything the agent arms (a wakeup, a background sleep) dies with the session, so the mission cannot bridge its own gap.

Proposal

Teach the wrapper to recognize the session-limit failure, parse the reset time out of the message, and schedule an automatic agenc mission reload <uuid> --prompt "continue" for shortly after the reset (plus a little jitter so a fleet of limit-killed missions does not stampede back at the same second).

Details that probably matter:

  • Opt-in via config (auto_resume_on_limit = true or similar), since not every mission should restart itself unattended.
  • Resume once per limit event. If the reload immediately hits the limit again, park for real and notify the user instead of looping.
  • The injected prompt could be configurable, but a plain "continue" already does the right thing for any mission that keeps its state on disk.

Alternatives considered

Notify the user (agenc notification new style). Tells the human to do a thing the machine already has every input for. The reset time is machine readable, so the machine should act on it.

A cron mission that polls for limit-parked missions. Works, but burns a mission slot to watch other missions, and the watcher is subject to the same limit as the watched.

Current workaround

Watch the clock and type "continue" after the reset, or run agenc mission reload <uuid> --prompt continue by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions