What is a Workspace?
A workspace is:- A git worktree (independent working tree) created under
.tempest/<name>/ - A dedicated branch with the same name as the worktree folder
- A terminal session or an agent session (Claude Code, Gemini CLI, Opencode, Cursor, Cline, Copilot CLI, or Goose)
- An isolated environment where one agent can make changes without affecting others
Initiating Workspace Creation
Workspace creation begins through the NewSessionMenu, which you open by clicking the + button in the tab bar or using the keyboard shortcut.Opening the New Session Menu
The menu appears with these options:- New Terminal
- Agent Session
- Chat
- Live Preview
Open a bare terminal session in this workspace. No agent is involved, just bash or powershell.
The Workspace Creation Modal
After selecting New Terminal or an Agent Session, you see a modal asking you to name your workspace.Step 1: Name Your Workspace
- Required for “in Branch” creation
- Alphanumeric, hyphens, underscores allowed
- Whitespace is trimmed
- If a
branchPrefixis set in settings, it will be prepended (e.g.,prefix-my-feature)
- Optional Custom Prompt field appears
- Text entered here is sent to the agent the moment it spawns
- Blank prompts are fine; the agent will wait for manual input
- Useful for: “Refactor the auth module”, “Add unit tests”, etc.
Step 2: Git Initialization Check
After you click in Branch, Tempest checks if the project is a git repository. If git repo exists:- Proceeds to worktree creation (Step 3)
- Modal shows: “No Git Repository Found”
- Two options:
- Initialize Git & Launch - Creates a git repo, optionally adds a remote URL, then creates the worktree
- Continue without Git - Launches a root session (no worktree, no branch, limited functionality)
If Initializing Git
- Runs
git initin the project root - Adds the remote URL if provided
- Proceeds to worktree creation
If the repository has no commits yet, Tempest automatically creates one. See Git and Commits below.
Step 3: Creating the Worktree
Once git is confirmed to exist, Tempest calls the Rust backend to create the worktree:-
Ensure at least one commit exists
- Checks
git rev-parse --verify HEAD - If no commits: creates
.tempest.gitignore, stages files, and commits with author “Tempest” - This is necessary because git worktree needs a HEAD to branch from
- Checks
-
Prune stale worktree metadata
- Runs
git worktree pruneto clean up any leftover metadata from failed attempts
- Runs
-
Create the directory
- Makes
.tempest/<name>/directory
- Makes
-
Check for conflicts
- If
.tempest/<name>/already exists and is registered with git, errors: “A workspace named ‘X’ already exists” - If the directory exists but is not registered, removes it and continues
- If
-
Create the git worktree
- Runs
git worktree add .tempest/<name> -b <name> - Creates a new branch with the same name as the worktree folder
- The branch is a sibling to main, ready for independent commits
- Runs
-
Configure git exclude file
- Writes
.git/worktrees/<name>/info/excludewith.tempest-pid - This keeps Tempest’s internal files from showing in git status
- Writes
-
Copy environment files
- Copies (does not commit) files from project root into the worktree:
.env.env.local.env.development.env.production
- These are copied because they are gitignored but the agent needs them
- Copies (does not commit) files from project root into the worktree:
-
Link dependency directories
- Creates a Windows directory junction or Unix symlink for:
node_modules(if it exists in the project root).venv(if it exists in the project root)
- See Dependency Linking for details
- Creates a Windows directory junction or Unix symlink for:
-
Validate non-empty worktree
- Checks that the worktree contains more than just
.git/ - If empty, errors: “Workspace created but contains no files. Your project files may be untracked or gitignored. Run ‘git add && git commit’ in the project root first.”
- This prevents the agent from seeing an empty directory
- Checks that the worktree contains more than just
-
Ensure .tempest.gitignore exists
- Writes a root-level
.tempest.gitignorethat ignores.tempest/(so worktrees don’t get committed)
- Writes a root-level
Root Sessions vs. Worktree Sessions
Tempest supports two types of sessions:Worktree Sessions
- What
- When to use
- Branches
- Data isolation
- Persistence
A session running inside
.tempest/<name>/ with its own git branchRoot Sessions
- What
- When to use
- Branches
- Data isolation
- Persistence
A session running directly in the project root (no
.tempest/ subdirectory)Choosing Between Them
| Scenario | Use |
|---|---|
| Multiple agents working on different features | Worktree sessions (root gets cluttered) |
| Single agent on the main branch | Root session |
| Testing/debugging with manual terminal | Either (worktree avoids polluting main) |
| Project has no git yet | Root session (if skipping git) or create worktree after git init |
The .tempest/ Directory Structure
When you create your first workspace, Tempest creates a.tempest/ directory in your project root. This directory is gitignored and contains all worktrees and internal metadata.
.tempest/itself is ignored by git (added to.tempest.gitignore)- Each worktree is a sibling folder named after its branch
atlas/andlogs/are reserved for Tempest internals and are never treated as git worktrees- Each worktree’s
.gitis a file pointing to.git/worktrees/<name>in the main repository
The sidebar will only list
.tempest/ subdirectories that are registered as git worktrees. Reserved directories like atlas/ and logs/ are hidden from the workspace list.Branch Naming Conventions
When you create a worktree workspace, a git branch is automatically created with the same name as the worktree folder.Branch Prefix Setting
Tempest respects abranchPrefix setting (configured in Settings > Appearance). If set:
- Workspace name:
my-feature - Branch prefix:
dev/ - Actual branch name:
dev/my-feature - Worktree folder name:
dev/my-feature
Valid Characters
Branch names follow git conventions:- Alphanumeric, hyphens, underscores, dots
- No spaces (trimmed from input)
- No
~,^,[,],\,(space), or other special characters - Cannot end with
.lock
Dependency Linking
When a worktree is created, Tempest links (not copies) large dependency directories to save disk space and time.Why Link Instead of Copy?
- node_modules can be 100s of MB with 100,000+ files
- Copying takes 30-120 seconds and doubles disk usage
- A symlink (Unix) or directory junction (Windows) is instantaneous and shares one copy
How It Works
Windows
- A reparse point that points to the original directory
- Reads and writes go through the junction to the shared copy
delremoves only the junction, not the target
Unix/macOS/Linux
- A symbolic link to the original directory
- Reads and writes follow the link to the shared copy
rmremoves only the symlink
What Gets Linked
node_modules/.venv/
npm install or python -m venv in the worktree).
Failure Handling
If linking fails (e.g., permission error on Windows):- Tempest logs a warning to stderr
- Does NOT fail the worktree creation
- The agent still gets a usable worktree
- The agent can manually
npm installor set up.venvif needed
When deleting a worktree, Tempest removes junctions/symlinks BEFORE removing the directory. This prevents
rm -rf from accidentally deleting the shared node_modules in the project root.Git and Commits
Initial Commit Creation
If the repository has no commits when you create a worktree:- Tempest stages all tracked files:
git add -A - Creates an initial commit:
- This gives the git worktree command a HEAD to branch from
Empty Worktree Detection
After creating a worktree, Tempest checks that it contains files (not just.git/). If the worktree is empty:
- All project files are gitignored
.gitignoreis overly broad- You created the repo but never committed anything
Opening an Existing Project vs. Creating New
Opening an Existing Project
In default mode (not zen), click Open Project on the Overview page or use Ctrl+K (Settings > Keybindings):- Choose a folder containing a
.git/directory - Tempest scans
.tempest/for existing worktrees - All existing worktrees appear in the sidebar ready to open
- Sessions you had open before are restored
Creating a New Project
Click New Project in the welcome modal (or File > New Project in top menu, if available):- Name your project
- Choose where to save it
- Tempest creates an empty directory
- You can now create workspaces inside it
Zen Mode
If you launch Tempest pointing to a single project folder (via CLI or app launcher), Zen mode activates:- Only that project’s workspaces are shown
- Sidebar is simplified
- “New Workspace” button is prominent
- No project switcher
Branch Naming Edge Cases
No Commits Yet
If git is initialized but has no commits:- Tempest creates an initial empty commit (see Git and Commits)
- Then creates the worktree branch
- You can now commit real files on the new branch
Duplicate Branch Names
If a workspace with the same name already exists:- Use a different name
- Delete the existing workspace first (right-click > Delete)
Very Long Names
Git has no hard limit on branch name length, but some filesystems do. Tempest doesn’t truncate names, so if your worktree folder path exceeds the OS limit (usually 260 chars on Windows, 4096 on Unix), git operations may fail. Keep workspace names under 30 characters to be safe.Session Naming and Persistence
What Gets Displayed
In the sidebar, sessions are identified by:- Worktree sessions: The folder name under
.tempest/(also the branch name) - Root sessions: The session name you provided, or “Terminal” / agent name if you left it blank
- Optionally, an icon showing whether it’s a terminal or which agent is running
How Sessions Persist
Worktree agent sessions:- Stored in browser localStorage under the worktree path
- Includes agent type, conversation ID, and session name
- Resumed on app restart if the worktree still exists
- Stored with a unique key based on project path + session UUID
- Conversation ID is persisted so the agent can resume
- Survive app restart as long as the project is still open
- Not persisted between restarts
- New terminal appears as a fresh tab each time
- Persisted by instance ID in runtime state
- Re-opened on app launch
You can rename any session by double-clicking its tab. The rename doesn’t change the branch name (worktree) or workspace folder, only the display name in Tempest.
Troubleshooting Workspace Creation
”Not a git repository”
Cause: Project root is not a git repo Fix: Use the modal’s Initialize Git button, or rungit init manually
”Workspace created but contains no files”
Cause: All project files are gitignored Fix: Commit at least one tracked file to the project root:“A workspace named ‘X’ already exists”
Cause: Folder.tempest/X/ exists and is registered as a git worktree
Fix: Choose a different name, or delete the workspace first
Workspace creation hangs
Cause: Usually copying a very largenode_modules (if symlinking fails)
Fix: Wait or kill the app. Next time, ensure node_modules permissions allow symlinking on Windows, or pre-install dependencies in the project root.
Agent not starting / workspace is empty
Cause: Agent spawned but has no files to see Fix: Verify files are committed in the project root (see Empty Worktree Detection)Summary
Creating a workspace in Tempest is a streamlined process:- Click + in the tab bar or use keyboard shortcut
- Choose an agent or terminal from the menu
- Name your workspace (alphanumeric + hyphens)
- Git check (initialize if needed)
- Worktree created under
.tempest/<name>/with a matching branch - Session launches with that worktree as the working directory
- Share dependencies via symlinks to save disk space
- Work in isolation while other agents work in parallel