Keeping secrets out of the AI chat when driving a coding agent from your phone: Simon Willison had Codex build web-edit and edits those files himself over Tailscale
While working from his phone with Codex Remote, Simon Willison needed to edit a credentials file without round-tripping the credentials through the LLM. He had Codex (GPT-6 Astra Extra High) build web-edit, a small Python web app: the agent starts it on the machine and he edits files himself from his phone over Tailscale. He later added copy-to-clipboard to move logs from remote runs into a Gist. We ran version 0.1a2 on our test machine.
Visit site web-edit (built with Codex) + Tailscale ↗- Pricing
- Free
- Region
- Global
- Where it's from
- Overseas
- Added
- Oct 19, 2026
- Tested on
- Oct 19, 2026
- Version we used
- web-edit 0.1a2 (PyPI, 2026-10-17), run via uvx on Python 3.13; author used Codex Remote with GPT-6 Astra Extra High
- Categories
- CodingProductivity
- Original author
- Simon Willison @simonw ↗
- Our test
- Partly tested
- Cost / time
- web-edit is free (Apache 2.0) and Tailscale's personal plan is free; Codex Remote needs a ChatGPT plan (that's just the author's setup; any remotely driven agent works).
The task
When you're away from your computer and directing an agent from your phone, you need to edit .env or key files, or grab logs from a remote run, without the sensitive content entering the chat.
Steps
- Install Tailscale on the computer and the phone, signed in to the same tailnet.
- On that machine, run web-edit (Python 3.11+): uvx web-edit --host "$(tailscale ip -4)" ~/your-project. Listening directly on the Tailscale address auto-allows it; the default is 127.0.0.1:9000 only.
- To use a MagicDNS name, or when listening on 0.0.0.0, add --allowed-host your-machine.xxx.ts.net (repeatable), or requests are rejected (DNS rebinding protection).
- Or, like the author, have the agent start it; the prompt below is our example wording (not his), and the key part is: start the server, don't touch file contents.
- Open http://<tailscale-ip>:9000 in the phone's browser, edit .env in the CodeMirror 6 editor and save; it warns about unsaved changes and refuses to overwrite a file that changed on disk.
- To get logs or screenshots out, use the copy-to-clipboard added in 0.1a2 (text, and images under 16 megapixels, over HTTPS or localhost), or download the file.
- Stop the server when done: there's no authentication, so anyone on the tailnet who can reach the port can read and write that folder.
Prompt
On this machine, run uvx web-edit --host "$(tailscale ip -4)" pointed at the current project folder, keep it running in the background, and just tell me the URL. Do not read, print or modify .env or any other secrets file; I'll edit them myself in the browser.
What the author says
The author says (2026-10-12) that while working from his phone with Codex Remote he wanted to edit a credentials file without round-tripping it through the LLM, so he had Codex with GPT-6 Astra Extra High build web-edit. It's meant to run over Tailscale: an agent starts it, and he edits files from his phone via the tailnet. He chose CodeMirror 6 because Monaco still lacks a good mobile experience. 0.1a1 added performance fixes Claude Opus 5.5 wrote from a Python 3.15 profiling report; 0.1a2 added copy-to-clipboard so he could move pelican test logs from a laptop he was driving from his phone into a Gist.
Our test
We ran web-edit 0.1a2 with uvx on our test machine (Linux, Python 3.13) and exercised its API with curl. We did not test Tailscale, a phone browser or Codex Remote.
What we found when we tried it:Tested 2026-10-19: uvx [email protected] starts immediately and listens on 127.0.0.1 by default. In a test folder containing a .env: browse and read worked; a save without the X-Web-Edit header got 403, with it 200; after changing the file on disk, saving with the old version hash got 409 "has changed on disk" and the file wasn't overwritten; ../ traversal and a symlink both got 403; a Host not on the allowlist (e.g. a .ts.net name) got 400; listening on 0.0.0.0, requests by the machine's IP also got 400 until we added -a <IP>, then 200.
How to get in
Posts are on simonwillison.net; code on GitHub, install from PyPI.
Who it suits
Developers who often drive Codex, Claude Code or similar agents remotely from a phone, and anyone who wants secret edits and log retrieval kept out of the chat.
Pitfalls
- No authentication: use it only over Tailscale or a trusted LAN, never on a public interface, and stop it when done.
- Listening on 0.0.0.0 without --allowed-host makes IP or hostname requests return 400 "Host not allowed" (we confirmed this).
- It keeps secrets out of the chat, not out of the agent's reach: an agent with shell access on the same machine can still read the file, so rely on your prompt and permissions too.
- It's alpha (0.1a2); copying images to the clipboard needs HTTPS or localhost, so it may not work over a plain-http Tailscale address.
- It won't follow symlinks or leave the root folder; to edit config elsewhere, start it with a different root.
More in this category
- A demo video per docs page that flags itself when the UI changesVideoScreenplayClaude CodeTool free; uses your agent's quota◐ Partly testedOverseas
- AI backend code that guards against races, leaks and bad migrationsCodingbackendskillsClaude CodePostgreSQLFree; about 2× tokens per task◐ Partly testedOverseas
- An afternoon of AI work, a 3D action game you play in the browserCodingClaude CodeTripoJimengSkill free; Claude quota plus asset tools◐ Partly testedChina
- Keep a long-running AI-built project from turning into a messCodingClaudeCodexoil-delegateNeeds Claude and Codex plans◐ Partly testedChina
- Use a web app once and get an AI write-up of how it worksResearchREAClaude CodeChromeFree tools; needs Claude or Codex◐ Partly testedOverseas