Skip to content

feat(claude-code): use SDK ContentCaptureMode instead of manual stripping#25

Draft
alexander-akhmetov wants to merge 1 commit intomainfrom
alexander-akhmetov/claude-code-capture-mode
Draft

feat(claude-code): use SDK ContentCaptureMode instead of manual stripping#25
alexander-akhmetov wants to merge 1 commit intomainfrom
alexander-akhmetov/claude-code-capture-mode

Conversation

@alexander-akhmetov
Copy link
Copy Markdown
Collaborator

@alexander-akhmetov alexander-akhmetov commented Apr 10, 2026

Let the SDK handle content stripping via Config.ContentCapture instead of the plugin's own buildOutputRedacted path. Configured via SIGIL_CONTENT_CAPTURE_MODE env var (full, metadata_only, no_tool_content), defaulting to metadata_only.


Note

Medium Risk
Changes how conversation/tool content is included and redacted in exported generations and tool spans; mistakes could unintentionally increase captured sensitive data, though defaults and invalid-mode handling fail back to metadata_only. The change is isolated to the Claude Code plugin’s telemetry pipeline and updates tests/docs accordingly.

Overview
Switches the Claude Code sigil-cc hook from a boolean SIGIL_CONTENT_CAPTURE flag and plugin-side redaction/[redacted] output generation to the SDK’s Config.ContentCapture using SIGIL_CONTENT_CAPTURE_MODE (full, metadata_only, no_tool_content).

The mapper no longer conditionally strips content; it always builds Generation input/output and relies on the SDK to strip content for metadata_only, while the plugin only instantiates the redactor when content modes include text. Tool execution spans are updated to always populate arguments/results, with inclusion governed by the SDK mode, and tests/docs are updated plus legacy env var support is preserved via resolveContentMode().

Reviewed by Cursor Bugbot for commit d2eeead. Bugbot is set up for automated code reviews on this repo. Configure here.

@alexander-akhmetov
Copy link
Copy Markdown
Collaborator Author

bugbot review

…ping

Let the SDK handle content stripping via Config.ContentCapture instead
of the plugin's own buildOutputRedacted path. The mapper now always
builds full content; the SDK strips it in SetResult when the mode is
metadata_only.

Configured via SIGIL_CONTENT_CAPTURE_MODE env var (full, metadata_only,
no_tool_content), defaulting to metadata_only. SIGIL_CONTENT_CAPTURE=true
is still supported as a legacy fallback mapping to full mode.
@alexander-akhmetov alexander-akhmetov force-pushed the alexander-akhmetov/claude-code-capture-mode branch from d2eeead to 2e6fbd4 Compare April 10, 2026 22:24
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d2eeead. Configure here.

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.

1 participant