Managing Goose Sessions
A session is a single, continuous interaction between you and Goose, providing a space to ask questions and prompt action. In this guide, we'll cover how to start, exit, and resume a session.
Start Session
- Goose Desktop
- Goose CLI
After choosing an LLM provider, you'll see the session interface ready for use. Type your questions, tasks, or instructions directly into the input field, and Goose will immediately get to work.
To start a new session at any time, click the three dots in the top-right corner of the application and select New Session from the dropdown menu.
You can also use keyboard shortcuts to start a new session or bring focus to open Goose windows.
Action | macOS | Windows/Linux |
---|---|---|
New Session in Current Directory | Cmd+N | Ctrl+N |
New Session in Different Directory | Cmd+O | Ctrl+O |
Focus Goose Window | Cmd+Option+Shift+G | Ctrl+Alt+Shift+G |
If this is your first session, Goose will prompt you for an API key to access an LLM (Large Language Model) of your choice. For more information on setting up your API key, see the Installation Guide. Here is the list of supported LLMs.
Name Session
- Goose Desktop
- Goose CLI
Within the Desktop app, sessions are automatically named using the current timestamp in the format YYYYMMDD_HHMMSS
. Goose also provides a description of the session based on context.
By default, Goose names your session using the current timestamp in the format YYYYMMDD_HHMMSS
. If you'd like to provide a specific name, this is where you'd do so. For example to name your session react-migration
, you would run:
goose session -n react-migration
You'll know your session has started when your terminal looks similar to the following:
starting session | provider: openai model: gpt-4o
logging to ~/.local/share/goose/sessions/react-migration.json1
Exit Session
Note that sessions are automatically saved when you exit.
- Goose Desktop
- Goose CLI
To exit a session, simply close the application.
To exit a session, type exit
. Alternatively, you exit the session by holding down Ctrl+C
.
Your session will be stored locally in ~/.local/share/goose/sessions
.
Resume Session
- Goose Desktop
- Goose CLI
- Click
...
in the upper right corner - Click
Previous Sessions
- Click a session
- Click
Resume Session
in the upper right corner
To resume your latest session, you can run the following command:
goose session -r
To resume a specific session, run the following command:
goose session -r --name <name>
For example, to resume the session named react-migration
, you would run:
goose session -r --name react-migration
While you can resume sessions using the commands above, we recommend creating new sessions for new tasks to reduce the chance of doom spiraling.
Search Session History
- Goose Desktop
- Goose CLI
In Goose Desktop, you can search session metadata including the description, filename, and working directory path. The search is text-based and supports case-sensitive matching, but doesn't search session content or support regex patterns.
- Click
...
in the upper right corner - Click
Previous Sessions
- Use
Cmd+F
to open the search bar - Enter your search term
- Use search features to refine and navigate results
Action | macOS | Windows/Linux |
---|---|---|
Next Match | Cmd+G or ↓ | Ctrl+G or ↓ |
Previous Match | Shift+Cmd+G or ↑ | Shift+Ctrl+G or ↑ |
Toggle Case-Sensitivity | Aa | Aa |
Focus Search Bar | Cmd+F | Ctrl+F |
Close Search | Esc or X | Esc or X |
The Goose CLI supports listing session history but doesn't provide search functionality. As a workaround, you can use your terminal's search capabilities (including regex support). Examples for macOS:
# Search session IDs (filenames)
ls ~/.local/share/goose/sessions/ | grep "full or partial session id"
# List sessions modified in last 7 days
find ~/.local/share/goose/sessions/ -mtime -7 -name "*.jsonl"
# Show first line (metadata) of each session file
for f in ~/.local/share/goose/sessions/*.jsonl; do
head -n1 "$f" | grep "your search term" && echo "Found in: $(basename "$f" .jsonl)"
done
# Find search term in session content
rg "your search term" ~/.local/share/goose/sessions/
# Search and show session IDs that contain search term
for f in ~/.local/share/goose/sessions/*.jsonl; do
if grep -q "your search term" "$f"; then
echo "Found in session: $(basename "$f" .jsonl)"
fi
done
Resume Session Across Interfaces
You can resume a CLI session in Desktop and vice versa.
- Goose Desktop
- Goose CLI
All saved sessions are listed in the Desktop app, even CLI sessions. To resume a CLI session within the Desktop:
- Click
...
in the upper right corner - Click
Previous Sessions
- Click the session you'd like to resume
If you named the session, you'll recognize the filename. However, if you don't remember the exact session name, there is a description of the topic.
- Click
Resume Session
in the upper right corner
CLI Command
goose session -n react-migration
Desktop Session
Session Description | Session Filename |
---|---|
Code Migration to React | react-migration.jsonl |
To resume a Desktop session within CLI, get the name of the session from the Desktop app. Note that unless you specifically named the session, its default name is a timestamp in the format YYYYMMDD_HHMMSS
.
- Open Goose Desktop
- Click
...
in the upper right corner - Click
Previous Sessions
- Find the session that you want to resume, and copy the basename (without the
.jsonl
extension).
Desktop Session
Session Description | Session Filename |
---|---|
GitHub PR Access Issue | 20250305_113223.jsonl |
CLI Command
goose session -r --name 20250305_113223
Remove Sessions
You can remove sessions using CLI commands. For detailed instructions on session removal, see the CLI Commands documentation.
Search Within Sessions
Search allows you to find specific content within your current session. The search functionality is available in both CLI and Desktop interfaces.
- Goose Desktop
- Goose CLI
Trigger search using keyboard shortcuts or the search icon:
Action | macOS | Windows/Linux |
---|---|---|
Open Search | Cmd+F | Ctrl+F |
Next Match | Cmd+G or ↓ | Ctrl+G or ↓ |
Previous Match | Shift+Cmd+G or ↑ | Shift+Ctrl+G or ↑ |
Use Selection for Find | Cmd+E | n/a |
Toggle Case-Sensitivity | Aa | Aa |
Close Search | Esc or X | Esc or X |
Search functionality is provided by your terminal interface. Use the appropriate shortcut for your environment:
Terminal | Operating System | Shortcut |
---|---|---|
iTerm2 | macOS | Cmd+F |
Terminal.app | macOS | Cmd+F |
Windows Terminal | Windows | Ctrl+F |
Linux Terminal | Linux | Ctrl+F |
Your specific terminal emulator may use a different keyboard shortcut. Check your terminal's documentation or settings for the search command.
Share Files in Session
- Goose Desktop
- Goose CLI
Share files with Goose in three ways:
-
Drag and Drop: Simply drag files from your computer's file explorer/finder and drop them anywhere in the chat window. The file paths will be automatically added to your message.
-
File Browser: Click the paperclip icon (📎) in the bottom left corner of the chat input to open your system's file browser and select files.
-
Manual Path: Type or paste the file path directly into the chat input.
You can reference files by their paths directly in your messages. Since you're already in a terminal, you can use standard shell commands to help with file paths:
# Reference a specific file
What does this code do? ./src/main.rs
# Use tab completion
Can you explain the function in ./src/lib<tab>
# Use shell expansion
Review these test files: ./tests/*.rs