Clicking copy button on tool input/output collapses the details section

Resolved 💬 2 comments Opened Mar 5, 2026 by NiveditJain Closed Mar 5, 2026

Description

When clicking the copy button on tool input, tool output, or similar collapsible sections in Claude Code, the details section collapses. This makes it difficult to work with the content because:

  1. You click copy on a section you're reading
  2. The section immediately collapses
  3. You lose your place and have to re-expand to continue reading

Expected Behavior

Clicking the copy button should copy the content to the clipboard without collapsing the details section. The expanded/collapsed state should remain unchanged.

Actual Behavior

Clicking the copy button triggers the collapse of the parent details/collapsible element, forcing the user to re-expand it every time they want to copy content.

Impact

This is particularly frustrating when:

  • Reviewing long tool outputs and copying portions
  • Comparing tool inputs/outputs across multiple sections
  • Working with multiple expanded sections simultaneously

Steps to Reproduce

  1. Run any tool that produces output (e.g., a file read, bash command)
  2. Expand the tool input or output details section
  3. Click the copy button
  4. Observe that the section collapses

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗