sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

[FEATURE] Enable resuming agent execution without requiring initial prompt

Open nagabharann opened this issue 10 months ago • 3 comments

Problem Statement

Resuming an agent currently requires providing an initial prompt. This makes it difficult to seamlessly resume agent execution from a pause point (e.g., after a tool call or model invocation) without injecting artificial prompts or modifying conversation history.

Proposed Solution

Enable continuing the agentic loop from a tool use or model call without requiring user input. This could be:

  1. An agent.resume() method that continues from the last execution point
  2. A flag on agent.prompt() to indicate continuation mode
  3. Support for empty/null prompts when resuming

Use Case

When implementing pause/resume functionality:

  1. Agent pauses mid-execution (e.g., waiting for human approval)
  2. Approval is granted asynchronously
  3. Agent should resume exactly where it left off, continuing with the tool result or next model call
  4. No artificial "continue" prompt should be needed

Alternatives Solutions

We currently inject synthetic prompts like "continue" which pollutes conversation history and can confuse the model.

Additional Context

No response

nagabharann avatar Jan 29 '26 20:01 nagabharann

Interrupts is our solution to this - https://strandsagents.com/docs/user-guide/concepts/interrupts/ does that work your purposes?

zastrowm avatar Mar 17 '26 15:03 zastrowm

This issue has been automatically closed as it was marked for auto-closure by the team and no additional responses was received within 7 days.

github-actions[bot] avatar Mar 25 '26 14:03 github-actions[bot]

@zastrowm Issue with interrupts is its available only for BeforeToolCallEvent, if we can open this up to any of the hooks that would be more useful so we can dynamically control & modify the agent's behavior.

nagabharann avatar Apr 06 '26 21:04 nagabharann