Skip to content

Approval cards show the tool's instructions to the model as the reason #398

Closed

Description

@itsskofficial

When a plugin tool (for example the browser's browser_click) asks for approval with no reason of its own, the engine fills the reason with the tool's description for the model (sentient/agent/loop.py:928: reason=f"{p.tool.plugin}: {p.tool.description[:160]}"). The card then shows text like:

browser: Click the element with this ref (from browser_snapshot), e.g. "e12". Buttons that buy, pay, send, post, delete or confirm need the user's approval. Never type p

It's written for the model, it's cut off mid-word, and the heading and the "Click 'Send message'" line above it already say what's happening.

Fix: don't use the tool description as the reason. Leave the reason empty, so the card falls back to its own line ("… using browser_click"), or let the plugin's describe function give a short, plain reason. Check the other plugin tools that reach this path.

Done when: a browser click approval card has no model instructions in it. Check with a screenshot of the real app.

Seen while testing #367.

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

    area: desktopElectron app and UIbugSomething isn't workingpriority: P2Later: useful, lower urgencysize: SSmall: a few days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions