Skip to content

Conversation

@constantinius
Copy link
Contributor

Description

Handling of non-text request messages

Issues

Closes https://linear.app/getsentry/issue/TET-1636/redact-images-anthropic

@constantinius constantinius requested a review from a team as a code owner January 5, 2026 15:14
@linear
Copy link

linear bot commented Jan 5, 2026

"output": item.get("content"),
"output": _transform_message_content(
item.get("content")
),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blob content in tool_result outputs not redacted

When a tool_result contains images, they are transformed to blob format and stored in the output field of a dict structure: {"role": "tool", "content": {"tool_use_id": ..., "output": [blobs...]}}. However, redact_blob_message_parts in utils.py only processes message content that is directly a list (if isinstance(content, list)). Since TOOL message content is a dict containing an output field with the blobs, the redaction logic never reaches the nested blob items. This causes sensitive base64 image data inside tool results to be sent to Sentry unredacted.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants