Simon Willison posted an example where agents communicate purely through file names, embedding base64 attachments and using 'zz' prefixes for ordering. The trick turns a filesystem into a deterministic message queue without a broker.
Key facts
- Base64 encoding adds ~33% overhead
- 255-byte filename cap limits payload to ~190 bytes
- zz prefix exploits lexicographic sort order
- No message broker required
- Example posted by Simon Willison on X
In a post on X, Simon Willison highlighted a neat example of AI agents coordinating entirely through filenames. The agents add base64-encoded attachments directly into the filename string, and use "zz" prefixes to ensure a new message sorts to the bottom of the list. This pattern leverages the filesystem's natural sort order as a deterministic ordering mechanism, eliminating the need for a separate message broker or chat interface.
This is a clever hack, but it has real constraints: filenames have length limits (typically 255 bytes on most filesystems), which caps the payload size. Base64 encoding adds ~33% overhead, so a 255-byte filename can carry roughly 190 bytes of raw data. For larger payloads, agents would need to write content to a file and reference it in the filename — a hybrid approach that still keeps the filename as the signal.
The "zz" prefix trick is particularly elegant: it exploits lexicographic sorting, where uppercase letters sort before lowercase, and 'z' is the last letter. By prefixing new messages with "zz", the agent ensures they appear last in a directory listing, mimicking a FIFO queue. This is a form of emergent protocol design — the agents are not following a predefined spec but inventing a convention that works within the constraints of the environment.
This example is notable because it shows how agentic systems can self-organize around available primitives rather than requiring bespoke infrastructure. It also highlights the growing trend of using the filesystem as a communication channel in multi-agent systems, a pattern that some frameworks are already formalizing. For instance, OpenAI's AgentKit and Anthropic's Claude Code have both experimented with file-based inter-agent messaging, though typically with JSON payloads rather than base64-in-filename tricks.
However, this approach is not production-grade: it lacks error handling, conflict resolution, and atomicity. If two agents write files with the same name, one overwrites the other silently. The base64-in-filename trick also breaks on filesystems with stricter naming rules, such as those that disallow certain characters. Still, as a proof of concept, it demonstrates the ingenuity of emergent agent protocols and the value of simple, deterministic primitives.
Why This Matters
The deeper takeaway is that agents are developing their own communication protocols on the fly, and the filesystem is becoming a default substrate because it is universally available and requires no setup. This mirrors early Unix philosophy — everything is a file — but applied to agentic AI. As multi-agent systems scale, expect to see more such emergent patterns, and also more formalized frameworks that codify them, possibly including better ordering guarantees and payload size handling.
Limitations and Risks
While clever, this pattern has clear limits. Filename length caps payload size, and base64 encoding wastes space. There is no built-in acknowledgment or retry mechanism — a message could be silently dropped if the file is deleted or renamed unexpectedly. For critical workflows, a proper message queue like Redis or Kafka remains more reliable. But for lightweight, exploratory agent interactions, this approach is a fast and hacky solution that works surprisingly well.
What to watch
Watch for formal frameworks that codify file-based agent messaging, such as updates to OpenAI AgentKit or Anthropic's Claude Code that add native filename-signaling support. Also track whether agent benchmarks like SWE-Bench or GAIA start including multi-agent file-coordination tasks, which would signal this pattern's mainstream adoption.








