Overview
Projects in T3 Code represent your codebases. Each project has a workspace root directory, default AI model, custom scripts, and associated threads (conversations). Effective project organization helps you manage multiple codebases and keep related work together.Creating Projects
From the Sidebar
Auto-Bootstrap
When starting the server, automatically create a project for the current directory:Via API
Programmatically create projects:Project Structure
Properties
Each project has:- ID: Unique identifier (
proj_...) - Title: Display name (defaults to directory name)
- Workspace Root: Absolute path to project directory
- Default Model: AI model for new threads (
codex-gpt-4o,claude-sonnet-4, etc.) - Scripts: Custom commands for this project
- Threads: Conversations associated with this project
Workspace Root
The workspace root is the project’s base directory:- AI can read/write files within this directory (and worktrees)
- File paths in conversations are relative to this root
- Git operations use this as the repository root
- Terminal shells start in this directory
The workspace root should point to your repository root for best Git integration.
Managing Projects
Viewing Projects
Projects appear in the sidebar with:- Favicon: Auto-detected from project (Next.js, Vite, etc.)
- Name: Project title
- Thread List: Expandable list of conversations
- New Thread Button: Quick action to start a conversation
Renaming Projects
Currently, project titles default to the directory name. To customize:Changing Default Model
Set the model for new threads in this project:Deleting Projects
Deleting a project:
- ✅ Removes project from sidebar
- ✅ Deletes project metadata from database
- ❌ Does NOT delete files from disk
- ❌ Does NOT delete Git repositories
Project Scripts
Custom scripts are project-specific commands that run in the project’s context.Creating Scripts
Scripts are managed via theproject.meta.update orchestration command:
Define Script Configuration
Create a ProjectScript object with:
- id: Unique identifier (1-24 chars, lowercase alphanumeric + hyphens)
- name: Display name (e.g., “Run Tests”)
- command: Shell command (e.g.,
npm test) - icon: Visual indicator (play, test, lint, build, debug, configure)
- runOnWorktreeCreate: Auto-run when creating worktrees
Script Context
Scripts run with:- Working directory: Project root or thread worktree
- Environment: Inherits system PATH and variables
- Terminal: Output shown in integrated terminal
- Exit handling: Non-zero exits show error state
Keybindings
Assign keyboard shortcuts to scripts:keybindings.json in your state directory.
Use Cases
Auto-Run Scripts
Scripts withrunOnWorktreeCreate: true execute automatically when creating a worktree for a thread. This is useful for:
- Installing dependencies
- Running builds
- Setting up database schemas
- Generating types
Threads and Projects
Creating Threads
Start a new conversation in a project:- Default (Local)
- Worktree Mode
Creates a thread that works in the project’s workspace root:
Thread Organization
Threads are listed under their project:- Most recent first: Sorted by creation date
- Status indicators: Working, completed, approval pending
- Relative timestamps: “5m ago”, “2h ago”, “3d ago”
- PR badges: If thread has an open/merged pull request
Thread Lifecycle
Multi-Project Workflows
Monorepo Setup
For monorepos, create one project per package:- Scope AI context to specific packages
- Use different models for different concerns
- Organize threads by component
Frontend + Backend
Separate projects for client and server:- Clearer thread organization
- Tailored AI models
- Independent Git workflows
Client Projects
Organize by client or engagement:Best Practices
Project Organization Tips
- One repo, one project: Keep projects aligned with repositories
- Clear naming: Use descriptive titles for easy identification
- Clean up regularly: Delete completed threads to reduce clutter
- Use scripts: Automate common tasks with project scripts
- Model selection: Choose models based on project complexity
Model Selection Guide
- Codex GPT-4o: Fast, general-purpose, cost-effective
- Codex o1: Complex reasoning, architecture decisions
- Codex o1-mini: Faster reasoning, simpler problems
- Claude Sonnet: Large context, long conversations
- Claude Opus: Maximum capability, critical work
When to Create New Projects
Create a new project when: ✅ Starting a new codebase ✅ Working in a different repository ✅ Needing different default settings ✅ Organizing by client or product ❌ Don’t create new projects for:- Different features in same repo
- Temporary experiments (use threads)
- Different branches (use worktrees)
Troubleshooting
Project Not Appearing
If a project doesn’t show in the sidebar:- Check the path is correct and accessible
- Verify you have read/write permissions
- Look for errors in the server logs
- Try refreshing the page
AI Can’t Find Files
If the AI reports missing files:- Confirm files exist in workspace root
- Check file paths are relative to workspace root
- Verify permissions allow AI to read files
- Try absolute paths as a workaround
Scripts Not Running
If project scripts fail:- Check command syntax is correct
- Verify required tools are in PATH
- Look at terminal output for errors
- Test command manually in terminal
Next Steps
- Master Git Workflow for version control integration
- Learn CLI Usage for advanced configuration
- Explore Web Interface for daily use
