Documentation

Everything you need to get started with Lanes.

Create a New Session

Creating a new session in Lanes is straightforward. Each session is isolated and runs in its own Git worktree, giving Claude Code a clean workspace to work in without affecting your main codebase.

Before You Start

Make sure you have:

  • Opened a folder or workspace in VS Code
  • A Git repository initialized (git init if needed)
  • Claude Code installed globally (npm install -g @anthropic-ai/claude-code)
  • Logged into Claude (claude login)
  • jq installed for status tracking (brew install jq on macOS or apt install jq on Linux)

Note: Lanes currently supports macOS and Linux. Windows is not yet supported (WSL may work).

Step 1: Open the Lanes Sidebar

Click the Lanes icon in the VS Code activity bar (the vertical bar on the far left) to open the Lanes panel. You'll see the session creation form at the top.

Tip

Can't find the Lanes icon? Use the command palette (Cmd+Shift+P) and search for "Lanes: Create Session".

Step 2: Fill in the Session Form

The form has several fields to configure your session. Here's what each one does:

1 Session Name *

A unique identifier for your session. This becomes the Git branch name, so use descriptive, Git-safe names.

✓ Good: fix-login-bug, add-dark-mode, refactor-api-client
✗ Bad: my session, task#123, testing!!!

Allowed characters: letters, numbers, hyphens, underscores, dots, and slashes

2 Source Branch (optional)

The branch to create the worktree from. If left empty, Lanes uses your current HEAD.

Example: Enter main to always start from main, or develop for your development branch.

Note: The source branch must already exist. Lanes will create a new branch (with the session name) from this branch.

3 Starting Prompt (optional)

The initial task description sent to Claude Code when the session starts. Be specific about what you want Claude to do.

Example: "Fix the authentication bug where users get logged out after 5 minutes. The issue seems to be in the token refresh logic in src/auth/TokenManager.ts"

Leave empty if you want to start with a blank session and provide instructions manually.

4 Acceptance Criteria (optional)

Define what success looks like. Claude will use this to know when the task is complete.

Example:
- Users stay logged in for at least 30 minutes
- Token refresh happens automatically before expiration
- All existing tests still pass

5 Permission Mode

Controls what Claude Code can do without asking for permission. Choose based on your trust level and workflow:

default Standard behavior - asks for permission on sensitive operations
acceptEdits Auto-accepts file edits (recommended for most workflows)
dontAsk Auto-deny tools unless explicitly allowed by an allow rule
bypassPermissions Runs all commands automatically (use with caution)

Recommendation: Start with default or acceptEdits until you're comfortable with how Claude works.

6 Workflow Template (optional)

Choose a structured workflow to guide Claude through your task. Workflows define clear phases like plan, implement, test, and review.

None (ad-hoc mode): Freeform session - Claude works without a predefined structure
Custom Workflows: Your own workflows from .lanes/workflows/

Click the refresh button (↻) to reload the workflow list if you just added new workflow files.

Step 3: Click "Create Session"

Once you've filled in the required fields, click the Create Session button. Lanes will:

1

Create a new Git worktree

Located at .worktrees/[session-name] - a complete, isolated copy of your repository

2

Create a new branch

Named after your session, branched from the source branch (or current HEAD)

3

Open a dedicated terminal

Each session gets its own terminal window in VS Code

4

Launch Claude Code

With your starting prompt (if provided) and selected permission mode

5

Initialize workflow (if selected)

Sets up the MCP server and prepares the workflow state

What Happens Next?

Terminal Opens: You'll see a new terminal window appear with Claude Code running. The terminal title shows your session name.

Session Appears in Sidebar: Your new session shows up in the "Active Sessions" list in the Lanes sidebar with a real-time status indicator.

Claude Starts Working: If you provided a starting prompt, Claude immediately begins working on your task. Otherwise, it waits for your instructions.

Isolated Environment: All changes Claude makes are contained in the worktree. Your main working directory remains untouched.

Tips for Success

Use descriptive session names

Names like fix-user-logout-bug are more helpful than session1

Be specific in your prompts

Include file paths, expected behavior, and any relevant context

Start with a clean working directory

Commit or stash changes in your main branch before creating sessions

Use workflows for complex tasks

Features with multiple files, testing requirements, or documentation needs benefit from structured workflows

One task per session

Keep sessions focused on a single goal - create multiple sessions for multiple tasks

Troubleshooting Common Issues

Error: "Session name already exists"

A session with this name is already active, or a branch with this name exists. Choose a different name or delete the existing session first.

Error: "Not a git repository"

Run git init in your project folder to initialize a Git repository.

Error: "Claude Code not found"

Install Claude Code globally: npm install -g @anthropic-ai/claude-code