VCode home

Comment on a line of a file

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

Right click or hold a line in the viewer, type what is wrong with it, and send it to the agent as a message that names the file, the line and quotes it. Select part of a line, or several lines, first and the comment quotes only what you selected.

Why you would use it

The agent wrote something you want changed, and "line 42 of runner.js, the timeout is too short" is easier to point at than to describe. The comment carries the line's text with it, so the agent does not have to guess.

How to use it

  1. Open a file in the viewer.

  2. Right click the line, or hold your finger still on it on a phone. A menu opens: Copy, Select all and Comment. A right click opens it where you clicked; on a phone it opens under the selection, past its handles, or above it when there is no room below.

    The menu open over line 6 of the editor: Copy, Select all and Comment

    Tap Comment. A box opens under the line: an avatar beside a text field with the placeholder comment on line <n>…. The avatar is the first letter of your VCode account's email, or Y when the workstation is not linked to an account.

  3. Type the comment.

    The comment box open under line 6, holding a sentence, with close, comment and start review under it

    To comment on part of a line, or on several lines, select the text in the editor first, then right click or hold inside the selection and tap Comment. The box opens under the selection's last line. Its placeholder reads comment on lines <first>–<last>… when the selection covers more than one line.

  4. Tap Comment to send it to the agent on its own, or Add to review / Start review to gather it with others (see review-a-file).

  5. Tap Close to drop the box without sending. On a line that already has a comment the button reads Remove; tapping it takes the comment away. Back, or Escape on a keyboard, closes the box the same way and leaves the file open.

What you see

The message the agent receives:

Comment on lib/runner.js:42
> const TIMEOUT = 10_000;
this is too short for a cold start

A comment on a selection quotes only the selection, one > line per line of it, and names every line it covers:

Comment on lib/runner.js:42-43
> const TIMEOUT = 10_000;
> const RETRIES = 1;
these two go together

Limits and known gaps