Skip to main content

Module resume

Module resume 

Source
Expand description

After a confirmed sign-in, an agent whose last turn failed on the expired login is told, and answers with where it stands (task #2458).

Clearing the stored failure (super::clear_signed_out) lifts the error from the pane and wakes the messages held for it, but a pane with nothing held sat there: the turn that failed never ran again, and the person had to type “u there”. Each pane that was cleared of an Auth failure now gets one [AgentMux] message that starts a turn: when it signed in, when the turn failed, and to carry on and say in a line or two where things stand. The input that started the failed turn is not sent again because AgentMux does not have it for every kind (a CLI’s own background-command completion is never seen here), and the agent’s session already holds it: the note is the same for all of them.

  • Only a pane whose last turn failed on the login (the stored failure is Auth), and not one already in a turn: a pane that did not fail gets nothing.
  • Paced: BATCH panes at a time, BATCH_GAP apart, since many agents share one account and each note starts a model turn.
  • Once: a sign-in is often reported twice (the OAuth handler and the window), so a pane told in the last ONCE_MS is not told again.
  • A pane with no controller (a stopped agent) is not started; the note waits for its next turn. A one-shot (container) pane gets a turn started the way any message to it does.

Structs§

Failed 🔒
A pane whose last turn failed on the expired login, as it was when the sign-in cleared it.

Enums§

Told 🔒
What was done for one pane.

Constants§

BATCH 🔒
How many panes are told at once.
BATCH_GAP 🔒
The wait between groups.
NOTE_KEY 🔒
The held note’s key: a newer one replaces an older one for the pane.
ONCE_MS 🔒
A pane told this recently is not told again for the same sign-in.

Functions§

batches 🔒
failed in groups of BATCH, in the order given.
not_just_told 🔒
failed without the panes told within ONCE_MS of now_ms, which are recorded as told now.
note_for 🔒
The note for one pane: what happened, and what is asked of the agent.
run 🔒
start 🔒
Tell each of failed, paced and once, in the background. Does nothing outside a runtime.
tell 🔒
Tell one pane. Blocking: starting a turn can wait for a process.