Advent of AI - Day 13: Goose Terminal Integration
Iβve edited this post, but AI helped. These are meant to be quick posts for the Advent of AI. If Iβm doing one of these each day, I donβt have time to spend a couple hours on each post.
The advent of AI series leverages Goose, an open source AI agent. If youβve never heard of it, check it out!
The https://github.com/block/goose repository on GitHubThe Challenge: Terminal Integration#
Advent of AI day 13 is about integrating Goose directly into your terminal. I tried it for the first time today, and honestly, it confused me at first. Iβm used to agent CLIs like Codex CLI, Claude Code, or Gooseβs own REPL where you enter a session, have a back-and-forth conversation, and then exit when youβre done.
Terminal integration with @goose works differently. It took me a bit to understand what itβs actually for.
What I Expected vs What I Got#
When I first ran @goose "help me with this", I expected it to drop me into a conversational session. Instead, it answered my question andβ¦ that was it. Back to my normal terminal prompt. No active session indicator, no βyou are now talking to Gooseβ feedback.
I thought βokay, so itβs just a fancy way to ask one-off questions?β That seemed useful but not revolutionary. The terminal integration docs mentioned persistent sessions, but it wasnβt obvious how that worked in practice.
The Difference: Ambient vs Active#
Hereβs what I figured out. Terminal integration is a fundamentally different model than traditional agent CLIs:
Traditional Agent CLIs (Aider, Claude Code, Goose REPL)
- You enter a session
- Back-and-forth conversation
- Blocking - youβre βin itβ until you exit
- When youβre done, you exit
- Session ends
Terminal Integration (@goose)
- No explicit session entry/exit
- You work normally in your terminal
- Call
@goosewhen you need it - It responds, then you continue your normal work
- Session persists in the background
- Call it again whenever - could be 5 seconds later, could be 5 minutes later
- Has full context from the session when you do
What clicked for me: itβs ambient assistance rather than active pairing.
You donβt have to commit to βIβm working with an AI now.β You just work normally, and when you need help, itβs there. No context switch, no blocking conversation, no βam I done with this session?β decision.
Setting It Up#
The setup is straightforward. Add this to your shell config:
# For zsh (add to ~/.zshrc)eval "$(goose term init zsh)"Note: The assumption is youβve installed the goose CLI. If you havenβt, run curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash
Restart your terminal or source the config, and youβre done. The docs cover bash, fish, and PowerShell too.
Iβm using Ghostty on macOS, but this works with any terminal emulator.
How It Actually Works#
Each terminal window gets its own Goose session that lasts until you close that window. When you run @goose (or @g for short), youβre continuing an ongoing conversation in that specific terminal.
Hereβs a real example from today. I was working on Day 13βs Festival Staff Scheduling project and needed to continue implementing a PRD:
β― @goose "continue with the PRD. We were at data organization. Continue implementing the beginner phase, /Users/nicktaylor/dev/advent-of-ai-2025/day-13/PRD-Festival-Staff-Scheduling.md"
βββ text_editor | developer ββββββββββββββββββββββββββpath: ~/d/a/day-13/PRD-Festival-Staff-Scheduling.mdcommand: view
Now let me check what's already been done in the project:βββ shell | developer ββββββββββββββββββββββββββcommand: cd /Users/nicktaylor/dev/advent-of-ai-2025/day-13 && find . -type f -name "*.json" ...
βββ text_editor | developer ββββββββββββββββββββββββββpath: ~/dev/advent-of-ai-2025/day-13/staff_data.jsoncommand: view
Great! I can see you've already completed the data organization step. The staff data has been structured into a comprehensive JSON format. Now let's continue with **Section 1.3: Basic Website (HTML/CSS)** from the Beginner Phase.Goose opened the PRD, checked what was already done, and told me the next step. All from one command. No session management, no explaining context.
The Sudo Use Case#
Hereβs where this model really makes sense. Iβve run into this problem a bunch with other agent CLIs: the agent needs to install something system-wide but canβt run sudo. So you have to:
- Pause the agent
- Open a new terminal
- Run the sudo command
- Go back to the agent
- Tell it youβre done and it should continue
β The images built successfully! Now I need to import them into K3s containerd with sudo:
β Bash(docker save homelab-everything-mcp:latest | sudo k3s ctr images import -) timeout: 5m 0s βΏ Β Error: Exit code 1 sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required
β I see the issue - sudo is requiring a password. Let me try saving the images to temporary files first, then importing them:
β Bash(docker save homelab-everything-mcp:latest -o timeout: 5m /tmp/homelab-everything-mcp.tar && docker save homelab-wishlist-mcp:latest 0s -o /tmp/homelab-wishlist-mcp.tar) βΏ Β Interrupted Β· What should Claude do instead?
> I can do it, what's the command?With terminal integration:
β― @goose "install this package globally"# Goose: "You need to run: sudo npm install -g whatever"β― sudo npm install -g whatever# You run it with your privilegesβ― @goose "okay continue"# Goose sees you ran the command, knows it succeeded, continuesEverything stays in one terminal. Goose sees what you did. No context loss, no explaining what happened.
This works for any scenario where you need to do something the agent canβt:
- Authentication flows (entering passwords)
- Interactive prompts from CLI tools
- Manual verification steps
- Privileged operations (Docker, system config)
Monitoring Your Session#
You can add context indicators to your shell prompt to see how full your session is:
# Add to ~/.zshrcPROMPT='$(goose term info) %~ $ 'Your prompt will show something like:
βββββ sonnet ~/projects $The dots show context usage (five dots total), and you see which model is active. When you hit βββββ, responses slow down and you should start a fresh session with eval "$(goose term init zsh)".
Named Sessions for Long-Running Work#
By default, each terminal gets its own session that disappears when you close it. If youβre working on something over multiple days or want to pick up where you left off after closing your terminal, use a named session:
eval "$(goose term init zsh --name my-project)"Named sessions stick around. Close your terminal, come back tomorrow, run the same command, and youβre right back in the conversation.
Still Figuring This Out#
Iβm new to Goose and Iβm still understanding when terminal integration makes sense versus using the full REPL. The ambient assistance model works well for:
- Working on a project with occasional questions
- Tasks that need manual intervention (sudo, authentication)
- Long sessions where youβre switching between coding and asking for help
But Iβm not sure it replaces the conversational flow of traditional agent CLIs for deep pair programming sessions. Thatβs something Iβll figure out as I use it more.
If you want to try this yourself, check out the terminal integration guide. And the full Day 13 challenge has more ideas.
If you want to stay in touch, all my socials are on nickyt.online.
Until the next one!
Photo by Amit Talwar on Unsplash