Skip to content

fix(prime): a failed session/prompt in ACP compatibility mode leaves the thread running forever #645

Description

@rynfar

What happens

On a Prime Agent instance running in ACP compatibility mode (a stock prime-agent on PATH, no Pylon-managed build), a turn whose session/prompt request fails leaves the thread on "Working" indefinitely. The session stays running, nothing is shown to the user, and anything waiting on that thread waits forever.

How it was found

Isolated dev server, 2026-09-18, stock prime-agent 0.8.1, model anthropic/claude-sonnet-5. The provider log for the thread ends with:

turn.started ... "model":"anthropic/claude-sonnet-5"
request session/prompt status=started
request session/prompt status=failed errorTag=Die reasonCount=1     (16 s later)

No turn.completed, no runtime.error, no session state change follows. The projection kept status = running for the rest of the server's life, and the UI showed "Working for 4m 42s … Thinking". The same build paired as an executor made a lead call pair_await in a loop against a thread that would never finish.

The server trace at the same time shows why native mode was not used, which is expected and not the bug:
PrimeAgentDaemonManagerError … (incompatible-hello) … The installed Prime Agent SDK does not provide the required caller-owned session contract.

Expected

A failed or defected session/prompt ends the turn as an error with the cause shown, and the session leaves running, as other ACP failures do.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions