Files
helder/docs/guide/pass-on-to-agent.md
T
2026-10-05 11:10:12 +02:00

5.0 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

   app/Http/UserController.php:42-45      (1) menu header
 +--------------------------------------+
 | * Pass on selection                  |  (2)
 |   Copy reference                     |  (3)
 +--------------------------------------+

 +----------------------------------------------+
 | * Pass on to agent                    [esc]  |  (4)
 | +------------------------------------------+ |
 | | Add a note (optional)...                 | |  (5)
 | +------------------------------------------+ |
 | Inserts [ check the eager load app/Http/  ]  |  (6)
 |         [ UserController.php:42-45        ]  |
 |         [ ```                             ]  |
 |         [ $user->load('roles');           ]  |
 |         [ ```                             ]  |
 | (enter) insert into agent   (esc) cancel     |  (7)
 +----------------------------------------------+
  1. Header: the reference the menu acts on.
  2. Pass on: "Pass on selection" with text selected, else "Pass on reference". Opens the prompt.
  3. Copy reference: copies the reference to the clipboard.
  4. Prompt title: marked with the amber spark that marks every pass-on action.
  5. Note field: an optional note. The keyboard starts here.
  6. Inserts: a live preview of the exact text that goes to the agent.
  7. Hints: Enter inserts, Esc cancels.

Features

The reference format

  • A single line: path:line, for example app/Http/UserController.php:42.
  • A range of lines: path:start-end, for example app/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.
  • Enter inserts 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.
  • 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 Enter in 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 Enter in 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+Right in 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