Skip to content

agent gets into a weird state when you interrupt during thinking #1602

@adboio

Description

@adboio

problem

(this is light, sorry, i'll update the issue when it happens again with more details and try to get something reproducible)

when you do this:

  • agent is running, in "thinking" state
  • interrupt (stop or esc)
  • send a new message

then:

  • the UI still shows the original thinking spinner, still spinning, in addition to the new state. like this:
[prompt A]

[some agent output]

⌛ thinking...

[prompt B]

🧠 booping...
  • the agent seemingly finishes the next turn (in response to prompt B)
  • agent never outputs, it just says Interrupted by user
    • as if the interruption was applied, but also queued up for later
  • send another message (prompt C) and it starts streaming the response to user prompt B
  • turn finishes
  • agent immediately starts working on prompt C

root cause

no clue yet, but it feels like:

  1. the interruption is correctly applied during the thinking state, after prompt A
  2. prompt B is submitted and the agent starts on it, but somehow the interrupt signal is still queued up
  3. agent finishes processing prompt B but then receives the queued interrupt signal
  4. prompt C triggers the agent but it has queued output from prompt B??
  5. prompt B output finishes streaming, agent immediately picks up prompt C as if it was queued?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingOpen BetaWe should probably take care of this before the open beta

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions