Skip to content

Blocked Tool Result Policy bypass when agent starts in sensitive context #4225

Description

@VadimLarinTech

When an agent has Treat context as sensitive from the start of chat enabled, blocked Tool Result Policies can be bypassed.

Repro:

  1. Configure a tool like read_issue.
  2. Set Tool Call Policy so the call is allowed.
  3. Set Tool Result Policy to Blocked.
  4. Enable Treat context as sensitive from the start of chat.
  5. Ask the agent to read an issue.

Expected:
The tool call may execute, but the result content should be replaced before it is sent to the model.

Actual:
The raw tool result is sent in the model-facing LLM request.

Root cause:
In platform/backend/src/guardrails/trusted-data.ts, evaluateIfContextIsTrusted returns early around line 68 when considerContextUntrusted is true, so it skips real Tool Result Policy evaluation around line 125 and
returns empty toolResultUpdates.

Slack thread with screenshots/repro:
SLACK_LINK


Archestra Contributor

Metadata

Metadata

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