Skip to content

Stop forwarding raw Claude process stderr to caller output #81

@ooloth

Description

@ooloth

Why

Every line written to the Claude subprocess's stderr — which can include tool outputs, repository file contents, and API responses containing personal data — is forwarded verbatim to the caller's stderr and written to the transcript file, treating tool output as diagnostic output.

Current state

workflows/implement.rs lines 281–287 pass every stderr line from the claude process through eprintln!("{l}") without filtering. The same raw data is also written to the transcript file in ~/.hub/transcripts/. Claude's stderr can include the content of files read during implementation — which may contain email addresses, API responses, or other personal data from the repositories being processed.

Ideal state

  • Claude process stderr is forwarded at an appropriate log level with a clear distinction between Claude status/diagnostic lines and tool output.
  • File contents and tool call results that appear in stderr are not forwarded to caller stderr.
  • The transcript captures the full interaction for local debugging, but caller stderr shows only Claude's status and error messages.

Out of scope

  • Disabling the transcript file entirely — local debugging value remains.
  • Parsing or redacting specific field names from tool output.

Starting points

  • workflows/implement.rs lines 281–287 — the stderr forwarding loop.
  • workflows/implement.rs lines 225–236 — the transcript file setup, to understand what the transcript already captures.

QA plan

  1. Run hub implement on an issue in a repo containing files with email addresses or API keys.
  2. Observe caller stderr — expect only Claude status messages, not file contents.
  3. Open the transcript file — expect the full interaction to be present for local debugging.

Done when

Caller stderr from hub implement contains only Claude diagnostic output, not the contents of files read during the implementation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions