VCode home

Edit a file

Agents: claude, codex, opencode · On: phone, desktop · beta

Every text file opens ready to edit. Change the text and save it to disk. A save never overwrites what the agent wrote in the meantime without asking you first.

Why you would use it

The agent got one word wrong in a config file, or you want to fix a typo before you ask for the next change. Typing the fix is quicker than describing it, and you do not need a terminal or a laptop to do it.

How to use it

  1. Open a text file: tap it in the explorer, tap a link to it in the transcript, tap Edit system prompt, or create one. It opens in the viewer in the editor, with line numbers. There is no mode to pick: the same editor shows the change marks and takes comments on a line. On a phone the keyboard stays down until you tap the line you want to change. On a wide window the file opens as a file tab in a pane, and only the file in the focused pane can be edited; a copy of it in another pane is read only.

    A JavaScript file in the editor: Undo, Redo and the save button in the head, a dot after the path for unsaved edits, and the edited line under the cursor

  2. Change the text. A dot appears after the path while there are unsaved edits.

  3. Tap the save button (#viewer-save, "Save (Ctrl+S)"), or press Ctrl+S (Cmd+S on a Mac). The toast reads saved.

  4. If the file changed on disk since you opened it, the save stops and a strip under the head reads changed on disk (#viewer-conflict):

    • Compare (#viewer-compare) shows your text against the disk, changed lines marked. The button then reads Back; tap it to return. Your edits stay as they are.
    • Reload (#viewer-reload) drops your edits and takes the disk's text. The editor stays open.
    • Overwrite (#viewer-overwrite) saves your text over the disk's.

    The conflict strip under the viewer head: changed on disk, then Compare, Reload and a red Overwrite

  5. If the file was deleted on disk, the strip reads deleted on disk. A save finds it, and so does the disk check while you have no unsaved edits. In the read view (see below) the strip only says so, and it goes when the file is back. In the editor:

    • Save as new (#viewer-save-new) makes the file again and saves your text into it.
    • Discard (#viewer-discard) drops your edits and closes the viewer.
  6. Tap close (#viewer-close) with unsaved edits and a card asks Save changes?. Save (#confirm-go) saves the file and closes it; if the save fails or the disk changed under you, the file stays open with the strip. Discard (#confirm-alt, red) drops your edits and closes it. Cancel (#confirm-cancel), the card's ×, or a tap outside it keeps the file open with your edits.

What you see

Options and settings

Option Default What it changes
Size limit 1 MiB The largest file that opens for editing, and the largest save the server accepts
Disk check every 3 s How often an open, clean file is read again
Draft delay 500 ms How long after the last keystroke the draft is written

Limits and known gaps