Warp documentation
  • Getting Started
    • Quickstart Guide
    • What is Warp?
    • Supported Shells
    • Migrate to Warp
    • Keyboard Shortcuts
    • Changelog
  • Agents
    • Warp AI
    • Using Agents
      • Agent Conversations
      • Model Choice
    • Autonomy
      • Agent Permissions
      • Run to completion
    • Code
      • Codebase Context
      • Reviewing Agent Code
    • Active AI
    • Generate
    • Voice
    • AI FAQs
  • Terminal
    • Appearance
      • Themes
      • Custom Themes
      • Prompt
      • Input Position
      • Text, Fonts, & Cursor
      • Size, Opacity, & Blurring
      • Pane Dimming & Focus
      • Blocks Behavior
      • Tabs Behavior
      • App Icons
    • Blocks
      • Block Basics
      • Block Actions
      • Block Sharing
      • Block Find
      • Block Filtering
      • Background Blocks
      • Sticky Command Header
    • Modern Text Editing
      • Alias Expansion
      • Command Inspector
      • Syntax & Error Highlighting
      • Vim Keybindings
    • Command Entry
      • Command Corrections
      • Command Search
      • Command History
      • Synchronized Inputs
      • YAML Workflows
    • Command Completions
      • Completions
      • Autosuggestions
    • Command Palette
    • Session Management
      • Launch Configurations
      • Session Navigation
      • Session Restoration
    • Window Management
      • Global Hotkey
      • Tabs
      • Split Panes
    • Warpify
      • Subshells
      • SSH
      • SSH Legacy
    • More Features
      • Accessibility
      • Files, Links, & Scripts
      • Markdown Viewer
      • Working Directory
      • Smart-Select
      • Full-screen Apps
      • Notifications & Audible Bell
      • Settings Sync (Beta)
      • Quit Warning
      • URI Scheme
      • Linux
    • Comparisons
      • Performance
      • Terminal features
    • Integrations
  • Knowledge & Collaboration
    • Warp Drive
      • Notebooks
      • Workflows
      • Prompts
      • Environment Variables
      • Warp Drive on the Web
      • Warp Drive as Agent Mode Context
    • Model Context Protocol
    • Rules
    • Teams
    • Session Sharing
  • Privacy
    • Privacy
    • Secret Redaction
    • Network Log
  • Community
    • Refer a Friend & Earn Rewards
    • Warp Preview & Alpha Program
  • Support & Billing
    • Sending Feedback & Logs
    • Plans & Pricing
    • Updating Warp
    • Using Warp Offline
    • Logging out & Uninstalling
    • Known Issues
    • Troubleshooting Login Issues
    • Open Source Licenses
Powered by GitBook
On this page

Was this helpful?

  1. Agents
  2. Code

Codebase Context

Warp generates a local, privacy-preserving outline of your Git-tracked codebase to help Agent Mode understand and answer questions about your code -- only sharing context when explicitly approved.

In order for Agent Mode to be able to answer questions about about the code files in your codebase, Warp can generate an outline containing relevant information about each file. This outline can then be used when querying Agent Mode to find relevant files for a requested query.

No code indexed with codebase context is ever stored on our servers.

Outline generation works in the following way:

  • When opening a new terminal pane or changing to a new directory in the terminal, check if this directory is a part of a Git repository.

  • If it is in a Git repository, extract metadata from each code file in the repository.

    • Only file types for languages supported by Agent Mode are processed.

    • Files in .gitignore are not processed.

    • This metadata currently includes function names in the file, but this may expand.

The first time that a user opens a directory after the Warp application is opened, the outline for the repository is fully generated. Creating an outline for repositories can take a few minutes for large repositories. Codebase context will not be used in Agent Mode queries until the outline is generated.

Outline generation is completely local. The outline is only sent to the server when an Agent Mode request is made that could use the codebase context and the user approves sending codebase context for that directory.

After the outline is generated in full, Warp watches for changes to any file in the directory and the outline is updated as needed.

These outlines can then be used by Agent Mode to search for relevant files to answer questions about a codebase, or find relevant files to edit.

You can disable generating codebase context outlines and using them for Agent Mode requests by disabling the "Codebase Context" setting.

Codebase context database

Warp saves the data from codebase context to local json files on your computer. You can open the files directly and inspect the full contents in the following location:

cd "$HOME/Library/Application Support/dev.warp.Warp-Stable/codebase_index_snapshots"
Set-Location $env:LOCALAPPDATA\warp\Warp\data\codebase_index_snapshots
cd "${XDG_STATE_HOME:-$HOME/.local/state}/warp-terminal/codebase_index_snapshots"
PreviousCodeNextReviewing Agent Code

Last updated 10 days ago

Was this helpful?