Menu
Install from Marketplace View on GitHub

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 your coding agent a clean workspace without affecting your main codebase.

VS Code and CLI

This guide covers session creation in VS Code. From a terminal, use lanes create <name>.

Before You Start

Make sure you have:

  • Lanes installed on your platform (see Installation)
  • A Git repository initialized (git init if needed)
  • At least one coding agent installed (Claude Code, Codex CLI, Gemini CLI, etc.)
  • jq installed for status tracking (brew install jq on macOS or apt install jq on Linux)

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

Step 1: Open the Lanes Panel

VS Code: Click the Lanes icon in the activity bar (the vertical bar on the far left).
CLI: Run lanes create <name> to skip straight to session creation.

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 Agent Selection

Choose which AI coding agent to use for this session. Click the agent logo to switch between available agents.

Claude Code Anthropic's coding agent — uses hooks for status tracking
Codex CLI OpenAI's coding agent — uses polling for session ID capture

Tip: Set a default agent with the lanes.defaultAgent setting to skip this step.

2 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

3 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.

4 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.

5 File Attachments (optional)

Drag-and-drop or click to attach files to your session. File contents are included with the starting prompt, giving the agent additional context.

Use cases: Design specs, API schemas, screenshots, reference implementations, or any file the agent should read before starting.

A progress indicator shows upload status for each file.

6 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.

7 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 the selected agent

With your starting prompt, file attachments (if any), 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

Error: "Codex CLI not found"

Install Codex CLI globally: npm install -g @openai/codex. Make sure you have an OpenAI API key configured.