Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Debounce timer for "Continue"

Open sayantanroy47 opened this issue 1 year ago • 1 comments

Feature Request: Add Auto-Continue Mechanism with Timer for Retry on Failure

Summary

Introduce an auto-continue mechanism that triggers retries based on a configurable timer (e.g., 5 seconds) rather than relying on manual user input through a retry button. This will improve usability and support more autonomous task execution flows.


Problem Statement

Currently, Kiro presents a "Retry" button upon task or command failure. Clicking this button often restarts the entire task chain, leading to redundant execution of the same steps and encountering the same failure. This is:

  • Inefficient (especially in token or API-cost-sensitive contexts)
  • Frustrating for users
  • Inhibitive to creating autonomous, self-correcting workflows

A significant pain point arises when users initiate a long or complex task and have to continually click the retry button every few minutes to make progress. This prevents true task delegation and breaks the user experience for agent-like systems.


Proposed Solution

Implement an automatic retry mechanism that activates after a short delay (default: 5 seconds) when a task fails. This mechanism should:

Key Features

  • Timer-based retry: Automatically attempts to continue after a failure with a debounce of 5 seconds (configurable).
  • No full reset: Resume from the point of failure rather than restarting the full command chain.
  • Retry throttling or limit: Optional backoff strategy or retry cap to avoid infinite retry loops.
  • Smart resume logic: Detect repeated failures with minimal state diffs or error patterns.
  • Optional manual control: Allow disabling or overriding auto-retry via configuration or UI toggle.

Use Cases

1. Autonomous Coding Tasks

A user prompts the agent to write, test, and debug code. If the system encounters a syntax or dependency error mid-way, it should automatically retry after a short wait, possibly correcting itself, without user intervention.

2. Transient Failures

Tasks that fail due to network issues, API latency, or ephemeral bugs can be retried automatically without disrupting the user flow or requiring repeated button presses.

3. Background Execution

Users running longer workflows expect them to complete autonomously. Manual retry requirements break immersion and productivity, especially when a user has stepped away from their screen.


Benefits

  • Improved usability: Reduces user friction and frustration during long-running or failure-prone tasks.
  • Token efficiency: Prevents redundant restarts that consume additional compute and tokens.
  • Supports autonomous workflows: Enables the agent to self-heal and complete tasks with minimal oversight.
  • Better debugging flow: Allows iterative progress through errors without constant user input.

Additional Considerations

  • Retry logs should be clearly recorded and visible in the UI or console for transparency.
  • It should be easy to disable auto-retry or adjust the debounce timer based on user preference.
  • Consider implementing exponential backoff or smarter retry scheduling for repeated or patterned failures.

This feature is critical for making Kiro feel like a true autonomous agent and dramatically improves the user experience in real-world, long-horizon tasks.

sayantanroy47 avatar Jul 17 '25 13:07 sayantanroy47

@sayantanroy47, we're tracking this feature request and overall DX improvement when errors happen in issue #665. I'll make sure this is linked to that issue so we capture all the context you've put into this, but please follow/upvote that issue for updates. Thanks!

cwomack avatar Jul 29 '25 14:07 cwomack