Pressing o in the Terminal UI or clicking Open in the macOS GUI opens the selected session’s CWD in your editor. The resolution order is:
- Cursor-specific shortcut — if the selected session is a Cursor session and the
cursorCLI is installed, it opens in Cursor IDE directly. Ifcursoris missing, the standard flow below is used. $VISUAL/$EDITOR— picked based on what’s set, with a TUI popup when both are defined.- Hint — if neither is set, lazyagent shows a short message pointing at how to configure them.
Resolution table
| Configuration | Behavior |
|---|---|
Both $VISUAL and $EDITOR set | Picker popup asks which one to use (TUI only; GUI defaults to $VISUAL) |
Only $VISUAL set | Opens as GUI editor |
Only $EDITOR set | Opens as TUI editor (suspends the TUI while the editor runs) |
| Neither set | Hint on how to configure them |
Recommended setup
Add to your shell rc file:
# ~/.zshrc or ~/.bashrc
export VISUAL="code" # GUI editor: VS Code, Cursor, Zed, …
export EDITOR="nvim" # TUI editor: vim, nvim, nano, …
With both set, the TUI will ask which to use each time — useful for switching between a GUI quick-jump and a full terminal session.
Config override
You can force a specific editor via editor in config.json:
{ "editor": "code" }
When set, this overrides $VISUAL / $EDITOR for all open actions.