Skip to content

Agent Runtime: Network retries not cancelled on interrupt; retry info not displayed #140

Description

@wangtsiao

Describe the bug

Two related issues with network retries:

1. Retries not cancelled on interrupt

When the user interrupts a query (e.g., pressing Ctrl+C or clicking "Stop"), any ongoing network retry backoff/sleep is not cancelled. The retry loop continues even after the user has explicitly stopped the operation.

2. Network retry information not displayed

When the system is retrying a provider request (e.g., waiting with exponential backoff), there is no UI feedback showing that a retry is in progress. The user sees no indication that the system is waiting and will automatically retry.

Expected behavior

  • When a query is interrupted, any pending retry timers should be immediately cancelled
  • The client should display a "Retrying in X seconds..." message so the user knows what's happening
  • Need to design and implement the appropriate event shape for retry status updates

Where to look

  • crates/core/src/query.rs — retry logic around lines 1036-1059 and 1214-1240
  • crates/protocol/src/event.rs — event shapes for client communication
  • Desktop and TUI apps — event consumption and display

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions