The interactive mode of the command line is the same agent, but in a terminal and with terminal habits. You start it from the repository you need, because the working directory determines both what the agent will see and where it will edit. Modes switch with the same shortcut as in the editor, multi-line input is typed with a separate combination, and quitting the program takes a double keystroke. The double confirmation is not a formality: in a long session one accidental keystroke closes a conversation that took half an hour to build, and getting back to it means going through the session list.
The terminal is set up for this once. A newline inside a message through Shift+Enter does not work everywhere: iTerm2, Ghostty, Kitty, Warp and Zed support it natively, while tmux and screen intercept the combination before it reaches the program. The reliable option is Ctrl+J, the control character for a line feed: it passes through a multiplexer and through SSH, where the capabilities depend on the local emulator rather than on the machine at the other end. The /setup-terminal command recognizes the terminal and shows how to add Option+Enter. The same effort closes the rest: modal editing is turned on with the /vim command or with an entry in ~/.cursor/cli-config.json, and the theme is detected from the terminal's response - and when that detection is wrong, it is set with the COLORFGBG variable.
The naive habit that causes the most trouble is starting the agent from wherever you happen to be. In a terminal that is easy: you are already standing in some folder and the command works. But the working directory is exactly the area the context comes from and where the edits happen. In a monorepo the difference shows best: starting from the root gives the agent every package at once, starting from a single package gives only that one. Both are legitimate, but they answer different tasks, and the choice between them is made by the directory rather than by the wording of the request.
Context in the terminal is assembled explicitly. A mention opens the picker for files and folders, and a separate command compacts the history when the conversation has grown long. The discipline is the same as in the editor, only without visual cues: nobody will show you that something extra went into the context. Compacting is sensible at task boundaries rather than in the middle of an investigation: what remains after compaction is a summary, and a detail needed one reply later cannot be recovered from it.
It helps to see a launch in different modes once. Below are moving into the repository directory and two calls: an explanation without edits and planning a migration. The mode flag decides more here than the wording of the task, and it removes the need to hope that the agent will read the words just explain correctly.
The difference between a flag and a wording is fundamental. A request to change nothing is a wish that the model interprets probabilistically; the mode flag takes the editing tools away from the agent at the level of the program. In the first case you rely on understanding, in the second on how the tool is built. The cost of a mistake is not symmetric: a misread wish produces edits you did not expect, and you notice them not in the conversation but in the diff, sometimes several steps later.
The signs that something has gone wrong in the terminal are recognized quickly. The agent answers confidently but refers to files you did not expect in this task, or claims the module you need is absent from the project - that is almost always the wrong working directory rather than an invention of the model. Answers have become generic and repeat what was already said - the history has outgrown its useful size and it is time to compact. Both symptoms are checked in a second and cost less than untangling edits made in the wrong place.
Sessions in the terminal continue in several ways: resume the last one, continue a specific one by identifier, look at the list. In the terminal that matters more than in the editor, because the work is interrupted more often: the window was closed, the machine restarted, you left for a meeting. A resumable session turns an interruption from a loss of context into a pause, and the session list replaces trying to remember how yesterday's conversation ended.
A separate technique is handing the current task to the cloud right from the terminal: a message with a special prefix goes to a cloud agent, and the work continues in the browser or on a phone. The convenience is obvious, but before handing over you check two things: that the cloud environment suits this task and that the required secrets are there in the right form. A task sent without an environment will honestly run into missing dependencies, and you will learn about it later, when you open it elsewhere.
The engineering conclusion is simple: the terminal gives maximum control and minimum hints. There are no visual reminders about the mode, the context and the directory here, so the discipline shifts to you: start from the right place, set the mode with a flag, assemble context explicitly and compact the history at task boundaries. In return you get predictability and the ability to put the whole sequence into a script that repeats the work without you.
The typical failures are predictable. Starting the agent from the wrong directory and getting work in the wrong place. Growing the history to the limit instead of compacting in time. Relying on wording instead of a mode flag. Closing the window without remembering which session to continue. And handing a task to the cloud without checking the environment and the secrets.
cd /path/to/repo
agent --mode=ask "Explain the entry points without editing"
agent --plan "Plan the authentication migration"
# continuing work: --resume, --continue, agent resume, agent ls