Pasted File Editor: Replicating Claude's Paste Detection in the Browser
Simon Willison built a web tool with Codex Desktop that mimics Claude.ai's automatic bulk paste detection, converting long text into attachments.
Anyone who regularly works with claude.ai has noticed a discrete but highly practical behaviour: when you paste a sufficiently long block of text into the chat, the interface automatically detects it and converts it into an attachment rather than leaving it as plain text in the input field. It's a UX decision that prevents long conversations from becoming unreadable and keeps the visible context from becoming saturated before you've even asked a single question.
Simon Willison, a regular reference point in the LLM tools community, noticed that mechanism and decided to replicate it as an independent prototype. The result is Pasted File Editor, a simple web tool that reproduces that same logic in the browser, without depending on any API or Anthropic account.
What the tool does exactly
The behaviour is as follows: you paste a large volume of text into the tool's text area and it treats it as if it were an attached file rather than direct input. It also allows you to open files from disk, including images which are shown as thumbnails, and drag them directly onto the text area. The interface is deliberately minimal: no backend, no remote processing, everything happens on the client side.
What makes this piece interesting isn't so much the tool itself, which is a functional prototype rather than a finished product, but the process Willison describes in his post from 2 June: he built it using Codex Desktop, OpenAI's environment for assisted programming, and publicly shared the gist with the prompt and resulting code.
Why these kinds of micro-tools matter
There's a category of utilities that rarely appears in official launches or press releases: those born from observing a specific behaviour in an existing interface and asking whether that logic can be extracted and reused in another context. The Pasted File Editor is exactly that.
From a technical perspective, the "bulk paste" detection in claude.ai is not magic: it involves listening to the `paste` event, measuring the volume of content and making a decision about how to represent it. The fact that this can be implemented in just a few lines of client-side JavaScript makes it a reusable pattern for any interface that handles long text inputs, from support forms to prompt editors to internal team tools.
For developers building interfaces on top of Claude's API, incorporating this pattern can improve user experience at no additional cost. It's not functionality that Anthropic explicitly documents as "copyable", but the fact that Willison has prototyped it and published the code makes it trivial to adopt.
Codex Desktop's role in the process
Willison's choice of Codex Desktop as the building tool is a detail he doesn't gloss over. In his post, he doesn't describe the process as particularly laborious: the agent generated the prototype from a functional description and the result was good enough to publish. This aligns with how Willison has been documenting his work for months on his blog: small, single-purpose tools built in short sessions with LLM assistance, and published without excessive polish.
It's a working model that contrasts with traditional development cycles and is especially suited to this kind of niche utility: they don't need active maintenance, they have no complex dependencies and their value lies in existing and being discoverable, not in scaling.
Who this is useful for
- Developers integrating Claude API into their own products who want to improve the UX of long text input.
- Chat or prompting interface designers looking for implementation references for similar behaviours.
- Anyone who works with Claude intensively and wants an offline tool to prepare and organize text before pasting it.
Sources
Read next
SpaceX's IPO Has Nothing to Do With Claude
SpaceX's IPO is today's big story, but ClaudeWave covers the Claude ecosystem. Here's why we didn't publish this and what you'll find instead.
A Farewell Counter for Fable 5 in Claude Code
A developer has published a countdown calendar marking the days until Fable 5 is discontinued in Claude Code. A modest project, but a signal of something larger.
Kickbacks: Advertising in Code Agent Loading Spinners
A project proposes turning code agent wait screens into ad space. The idea sparks debate over incentives, transparency, and trust in the ecosystem.