Chat: the server continues a usage-refused Claude chat at the reset
When Claude Code refuses an operator chat's turn for a usage limit and the server does not continue it on another account, the server now queues a durable prompt (auto-continue-<refusal id>, sent as Pipelines (automatic)) for a minute after the reset: the refused operator message when the turn did no work, else "continue". The reset comes from the refusal's text, else the rejected rate_limit_event. Refusals of turns Claude Code started itself are handled too, with no client attached; a restarted server or a device scheduling the same refusal adds nothing. The choice is kept per Claude home beside auto-switch (or by the server for chats without one), read and set with chat_auto_continue, on by default. The app's limit banner now finds the refusal as the latest turn, ignoring notices, agent reports and activity rows after it, reads and writes the server's choice, and only schedules its own prompt for older servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,7 @@ func (c *Chat) PromptWithMessageIDModelFiles(ctx context.Context, id, text, mess
|
||||
s.turnID = turn
|
||||
s.running = true
|
||||
s.beginTurnLocked()
|
||||
s.turnPrompt = strings.TrimSpace(text)
|
||||
s.steered = 0
|
||||
s.awaitFollowUp = false
|
||||
s.recordPromptLocked(messageID, text)
|
||||
@@ -254,6 +255,9 @@ func (c *Chat) SteerPrompt(ctx context.Context, id, text, messageID string, file
|
||||
s.mu.Lock()
|
||||
s.steered++
|
||||
s.lastUsed = time.Now()
|
||||
// A refused turn that took more than one message continues, rather
|
||||
// than resending its first.
|
||||
s.turnPrompt = ""
|
||||
s.recordPromptLocked(messageID, text)
|
||||
s.mu.Unlock()
|
||||
return true, nil
|
||||
|
||||
Reference in New Issue
Block a user