Skip to content

Behavior change in Tool output #736

@uuouter

Description

@uuouter

Describe the bug
tool.output magically changes to tool.input after upgrading. Yep that might sound very weird, bear with me haha.

Our agent has a very simple askUserTool.

inputSchema: z.object({
	question: z.string().describe('Short question to show to the user (no extra explanation).'),
	choices: z.array(z.string()).min(2).max(5).describe('The button labels to show.'),
}),

The output of that tool is the choice the customer has chosen. This deviates a bit from all of the YES NO examples.

This has been working great (for us). User picks a choice (confirms), agent continues. And still works great in the initial chat. But the moment I close my session and return to it later. The messages[] seem to have mutated and/or not persisted correctly.

e..g active chat

Image

output is nicely the choice, messages[] is correct, agent continues.

This happens after reloading (_Id say this happens like 80% of the time, but at some point I had to continue, so can't verify its 100% of the cases):

Image

(note: this Is a different tool callId but still illustrates the issue, for this toolId I've picked Full 3D scene before). Suddenly my output equals the input.

To be honest, I'm learning most of this as I go. Upgrading seems to be a pain point always, as AI moves pretty quick haha.

If I've missed anything my apologies. Also, if this is not how we're suppose to use the addToolResult that's an answer as well, but so far it has been working great for us.

Packages upgraded:
Image

I downgraded now, and the issue is gone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions