Skip to content

Raw SQLAlchemy error shown to the user when confirming a sub-stage #548

Description

@sdhrsd

What I did

I was running a CARE interview and sent Confirm Stage 3.2 as complete. - the same
thing I'd sent at four earlier sub-stages in that session.

What appeared

⚠️ The agent hit an error before finishing this turn: Method 'commit()' can't be
called here; method '_prepare_impl()' is already in progress and this would cause
an unexpected state change to <SessionTransactionState.CLOSED: 5>
(Background on this error at: https://sqlalche.me/e/20/isce)
Image

An SME shouldn't be shown this

CARE is meant to let a subject-matter expert design an agent without needing to
understand the platform. This message tells that person nothing they can act on -
not whether their work was saved, not whether the step went through, not whether
it's safe to try again.

I only found out re-sending was safe by going and checking the files myself. Someone
using the product normally wouldn't do that.

Can it be reproduced?

I don't know, and I don't know what caused it.

What I can say:

  • It happened once.
  • Four earlier sub-stage confirmations in the same session were fine, and the one
    after it was fine too.
  • The one that failed was the biggest sub-stage of the run - about twelve files,
    where the others had one or two. That might be relevant or might be coincidence.

Recovery

Sending the confirmation again worked.


Questions

  1. Should the user see a plain-language message here instead? Something like
    "Couldn't complete that step - your work is saved, try again" would have told me
    what I needed, if that's accurate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions