When an agent has Treat context as sensitive from the start of chat enabled, blocked Tool Result Policies can be bypassed.
Repro:
- Configure a tool like
read_issue.
- Set Tool Call Policy so the call is allowed.
- Set Tool Result Policy to
Blocked.
- Enable
Treat context as sensitive from the start of chat.
- 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
When an agent has
Treat context as sensitive from the start of chatenabled, blocked Tool Result Policies can be bypassed.Repro:
read_issue.Blocked.Treat context as sensitive from the start of chat.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,evaluateIfContextIsTrustedreturns early around line 68 whenconsiderContextUntrustedis true, so it skips real Tool Result Policy evaluation around line 125 andreturns empty
toolResultUpdates.Slack thread with screenshots/repro:
SLACK_LINK