A Terminal Workflow for AI Coding Agents on Mac
A terminal full of agent sessions becomes difficult to operate when every tab looks alike. The problem is not the number of windows: it is uncertainty about which project, branch, task, and decision each window represents. A useful Mac workflow makes those facts visible before you type, isolates concurrent edits, and leaves a record you can recover after a restart. The setup below works as an operating routine rather than a collection of shortcuts.
AI-assisted technical guide with linked primary sources. Examples are illustrative unless stated otherwise. How these guides are made.
Give every session an identity before starting work
Use four fields for each session: repository, worktree or branch, task, and role. A label such as store / agent/cart-tax / TAX-18 / implement tells you more than the agent product name. Keep the task identifier stable when an agent conversation restarts; conversation identifiers and process IDs are temporary references.
Maintain a small session register in a private note or project issue. Record the working directory, agent session identifier if available, owner, and current next action. For a solo developer, owner means the person responsible for deciding whether the result is acceptable, which is still you. Do not use a running process as proof that useful progress continues.
Before sending an instruction, inspect the actual directory and branch in that terminal. A correct-looking title is a navigation aid, not an authorization boundary. This brief check is especially useful after switching projects, restoring windows, or opening a new split.
Put concurrent editors in separate Git worktrees
Git worktrees let one repository have multiple working directories with their own checked-out branches. The Git worktree reference documents creation, listing, and removal. Create the branches from an explicit baseline so parallel tasks begin with a known relationship:
git status --short
git worktree add -b agent/cart-tax ../store-cart-tax main
git worktree add -b agent/search-label ../store-search-label main
git worktree list
Run these from an existing repository where main is the intended starting branch; inspect any uncommitted work before proceeding. Open a terminal in each new directory and verify the branch there. Assign one agent as the editor of each worktree. A second agent can review a diff without becoming a competing writer.
Worktrees separate checked-out files; they do not create a security sandbox. They can still share credentials, Git history, package caches, databases, ports, and external services. Give each task distinct development ports and disposable test data when those resources might collide. A database migration and an API change may require a shared contract even when their source files never overlap.
Configure Terminal.app titles for useful context
In Terminal.app, choose Terminal → Settings → Profiles and inspect Window title settings. Apple documents options including working directory, active process, and TTY in its window-title guide. For tabs, the Tab settings guide explains that title choices belong to the selected profile.
A practical layout is the directory or path plus process name, with a task label where your setup supports one. Directory names such as store-cart-tax and store-search-label then remain recognizable even when both agents launch through the same runtime. TTY information helps distinguish two terminals that otherwise look identical.
Avoid putting access tokens, customer names, or sensitive issue descriptions into titles. Titles can appear in screenshots and screen sharing. Use compact internal task IDs and keep private details in your normal development system. Test the settings in a newly opened tab before applying a profile to all your existing windows.
Understand Ghostty shell integration and directory inheritance
Ghostty’s shell integration documentation describes working-directory reporting and prompt navigation. It also notes that automatic integration applies to the initial shell and that the Bash bundled with macOS needs manual setup. If a new terminal starts in an unexpected directory, investigate the shell integration before adding more automation.
The Ghostty configuration reference distinguishes window, tab, and split directory inheritance. It also documents the shell integration title feature. Shell hooks or running programs may update titles, so a manually chosen label should not be your only record of task ownership.
For an agent workflow, establish predictable behavior: decide whether new splits should inherit the current directory, then verify it with pwd. Reserve one split for the interactive agent and another for independent inspection. Keep your review commands out of a terminal that is currently expecting an approval response. If you enter another shell inside the terminal, recheck integration-dependent behavior rather than assuming it carried across.
A worked layout for two coding tasks
Suppose one task corrects tax rounding while another improves a search label. This is an illustrative arrangement, not a measured productivity claim. The tax task has behavioral risk and needs precise fixtures; the label task needs accessibility and visual review.
| Terminal | Directory | Purpose | Next human action |
|---|---|---|---|
| Tax agent | store-cart-tax | Implement TAX-18 | Review rounding examples |
| Search agent | store-search-label | Implement UI-42 | Inspect accessible name |
| Integration | store | Review combined result | Accept one change at a time |
Give both agents explicit acceptance criteria and tell them who owns integration. Keep the integration worktree free of agent edits until review begins. When a task pauses for input, read its latest context before responding: approving a test command and approving a production change are different decisions.
If one task discovers a shared dependency change, pause that part and establish a single owner. Separate terminals make parallel work convenient, but they cannot resolve conflicting product requirements. Document the decision in the task register so resumed sessions see the same agreement.
Keep review evidence separate from terminal activity
A quiet terminal might be waiting for a tool; a busy terminal might be retrying unsuccessfully. Treat visible activity as a reason to inspect, not as a verdict. Ask the agent to report changed files, checks run, unresolved failures, and assumptions. Run the project’s relevant verification from the correct worktree and keep the command, result, and revision together.
Review the diff before integrating. Check for accidental configuration edits and unrelated generated files, especially when an agent was allowed to install dependencies. A successful unit test does not establish that the user-facing requirement is satisfied. For the tax task, inspect concrete rounding cases; for the search task, check the rendered control and its accessible name.
Before closing a terminal, save a short checkpoint: task objective, branch, last verified revision, remaining work, and any pending approval. Restoring a window restores a place to work; your checkpoint explains what that work was supposed to achieve.
Add Purrvio when finding the right session becomes the bottleneck
Purrvio adds local session visibility to this routine. Its Mac preview reads supported local session records and processes without installing agent hooks; Claude Code and Codex have the richest session support. You can see supported working or attention states from the notch panel and return to the relevant session.
Navigation supports Ghostty and Terminal.app. Direct replies require Ghostty and macOS Automation permission. When several terminals are possible matches, choose the correct existing tab rather than treating the first suggestion as definitive. Purrvio does not schedule your tasks or verify the correctness of an agent’s patch; keep the ownership and review steps above.
The free preview runs on macOS 13 or later on Intel and Apple silicon Macs. It is locally signed and is not Apple-notarized. Read the download and installation details before trying it with your daily workflow.
Use a short start-and-finish checklist
- Start: confirm repository, branch, worktree path, task, and owner.
- Prepare: give concurrent editors separate worktrees and distinct shared resources.
- Navigate: show useful directory or task context in terminal titles.
- Respond: inspect the session and requested action before typing an approval.
- Review: inspect the diff and connect verification evidence to the current revision.
- Finish: checkpoint unfinished work and preserve useful evidence before cleanup.
Increase concurrency only when you can still identify each session and review its output promptly. If finding the correct terminal or understanding a pending decision takes longer than the task itself, reduce active work and improve the session register before launching another agent.
Frequently asked questions
Do I need Ghostty to run AI coding agents on Mac?
No. Choose a terminal supported by your agent and operating system. In Purrvio’s preview, both Ghostty and Terminal.app support session navigation, while direct replies specifically require Ghostty and Automation permission.
Are separate tabs enough to isolate two coding agents?
Separate tabs only separate terminal surfaces. Agents in the same directory can still edit the same files. Use distinct worktrees for concurrent editing, and separately isolate shared ports, databases, credentials, or services when necessary.
Why does a new Ghostty tab open in the wrong directory?
Directory behavior depends on inheritance settings and working shell integration. Check the relevant tab or window setting, verify integration for the shell you actually launched, and confirm the resulting directory before starting an agent.
Sources and further reading
Primary references checked for this guide on 10 November 2026. Documentation can change; confirm version-specific behavior before using commands in a production workflow.
- Git worktree reference
Verified worktree creation, listing, branch checkout, and cleanup semantics.
- Apple Terminal window titles
Verified profile window title options including directory, process, and TTY.
- Apple Terminal Tab settings
Verified tab-title fields and per-profile scope.
- Ghostty shell integration
Verified directory reporting, initial-shell behavior, and macOS bundled Bash limitation.
- Ghostty configuration reference
Verified window/tab/split directory inheritance and shell title feature.