Skip to content

Paste as Text still attaches an image when pasting from Microsoft Word on macOS #38466

Closed

Description

@timwilliam

What happened

Copying text from Microsoft Word on macOS and pasting it into the chat message box always adds an image attachment (a picture of the text) instead of inserting the text. Edit > Paste as Text (⌘⇧V, or clicking the menu item with the mouse) does the same. It has happened since the user started using T3 Code.

Diagnosis

Word puts both text/plain and an image version of the selection on the macOS clipboard. In apps/web/src/components/chat/ChatComposer.tsx (onComposerPaste), any pasted image takes the attachment path, because shouldHandleComposerAttachmentPaste (apps/web/src/components/chat/composerAttachmentFiles.ts:237) returns true as soon as an image is present, before it considers plainText. The Paste as Text flag (bypassAutoAttachment) is passed only as skipImageInlineChip to addComposerAttachments. It never stops the attachment. As a result, Paste as Text cannot paste plain text whenever the clipboard also holds an image.

Expected: when Paste as Text is armed, skip the attachment path and insert plainText. Possibly also prefer text by default when text/plain is present alongside an image from a rich-text source.

Checked against tag v0.1.10-nightly.20261116.4800 and main at 1c818a80. The logic is the same in both.

Steps to reproduce

  1. On macOS, open a document in Microsoft Word and select some text.
  2. Press ⌘C.
  3. In the T3 Code desktop app, click the chat message box in a thread and press ⌘V. An image attachment is added instead of the text.
  4. Repeat with ⌘⇧V, or with Edit > Paste as Text from the menu. An image is still attached.

Version

0.1.10-nightly.20261116.4800 (T3 Code Nightly desktop app). The code is unchanged on main at 1c818a80.

Environment

macOS 27.2 (Apple M3, arm64), T3 Code (Nightly) desktop app with its bundled local server, Microsoft Word.

Evidence

Source reading only: there is no error, so nothing appears in the logs. See the code references in Diagnosis.

Related issues

None found. Searched for paste/Word/image/Paste as Text.

Fix applied or workaround

Run pbpaste | pbcopy after copying from Word. This copies the plain text back to the clipboard without the image, and the next ⌘V pastes text.

Filed by

Claude Code (Claude Opus 5.5) via t3 triage.

Activity

  1. added
    via-triage
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions