4.9 KiB
4.9 KiB
Pass on to Agent
Pass on to Agent sends a pointer to your code to the Claude Code pane: a file path with a line or a line range, and optionally the selected code and a note. Copy reference puts the same pointer on the clipboard instead.
Guide index · Related: File view, Diff, Claude Code, Right-click menu
At a glance
+--------------------------------------+
| * Pass on selection | (1)
| Copy reference | (2)
+--------------------------------------+
+----------------------------------------------+
| * Pass on to agent [esc] | (3)
| +------------------------------------------+ |
| | Add a note (optional)... | | (4)
| +------------------------------------------+ |
| Inserts [ check the eager load app/Http/ ] | (5)
| [ UserController.php:42-45 ] |
| [ ``` ] |
| [ $user->load('roles'); ] |
| [ ``` ] |
| (enter) insert into agent (esc) cancel | (6)
+----------------------------------------------+
- Pass on: "Pass on selection" with text selected, else "Pass on reference". Opens the prompt.
- Copy reference: copies the reference to the clipboard.
- Prompt title: marked with the amber spark that marks every pass-on action.
- Note field: an optional note. The keyboard starts here.
- Inserts: a live preview of the exact text that goes to the agent.
- Hints:
Enterinserts,Esccancels.
Features
The reference format
- A single line:
path:line, for exampleapp/Http/UserController.php:42. - A range of lines:
path:start-end, for exampleapp/Http/UserController.php:42-58. - The path is relative to the project folder.
- With text selected, the range covers every line the selection touches.
- With nothing selected, the reference is the line you right-clicked.
Right-click in the code
- Right-click anywhere in the file view. The menu has exactly two items: a Pass on item and Copy reference.
- Without a selection: Pass on reference and Copy reference, for the clicked line.
- With a selection: Pass on selection (sends the reference and the selected code) and Copy reference (copies only the reference).
- In the Markdown Preview and on an image, the reference points at line 1 of the file.
- In the Diff, right-click a line on either side. The reference uses the line number of that side. The Diff passes on a reference, not code.
Copy reference
- Puts the reference on the clipboard.
- A "Copied reference" notification shows the reference.
The pass-on prompt
- Opens next to the click or the selection.
- Type a note, or leave the field empty.
Enterinserts the text into the Claude Code pane.Esc, or a click outside the prompt, cancels without inserting.- What is inserted:
- Reference only, no note:
app/User.php:42 - Reference with a note:
check this => app/User.php:42 - Selection: the note (if any) and the reference on one line, then the selected code in a fenced code block.
- Reference only, no note:
- A "Passed to agent" notification confirms the insert and shows the reference.
How the text lands in Claude Code
- The text goes into Claude's input as pasted text. It is never submitted.
- You can read it, edit it, and press
Enterin the Claude pane yourself when you are ready. - The keyboard stays where it was. Click the Claude pane, or move focus there, to send.
Stack several references
- Pass on as many references as you like before you send.
- When Claude's input already holds text, each new insert starts on a new line.
- Once you send (press
Enterin Claude), the next insert starts a fresh message.
Pass on with the keyboard
- Select text in the file view and press
Cmd+Right. The prompt opens for that selection, with the code included. - Without a selection,
Cmd+Rightin the code keeps its normal meaning (end of line).
Other things you can pass on
- Files, folders and Git rows have their own pass-on items in their right-click menu, such as Pass on file name.
- The project note can be passed on as a whole.
Keyboard
| Keys | Action |
|---|---|
Cmd+Right |
Open the pass-on prompt for the selected code |
Enter |
Insert into the agent (in the prompt) |
Esc |
Cancel the prompt or close the menu |
Up / Down / Enter |
Choose a menu item |
Related
- Claude Code: the pane that receives the text.
- File view: select code and right-click.
- File view: Diff: pass on a line from the comparison.
- Right-click menu: all menus and their pass-on items.
- Notifications: the confirmations after copy and pass on.