Skip to content

Teams

The Teams page manages how you preserve and share Codebase Intelligence data across machines and developers.

Each machine produces its own backup file named {github_user}_{hash}.sql, stored in oak/history/ (git-tracked by default). This means every developer on the team has their own backup alongside the source code.

Team backup status and controls

DataIncludedNotes
SessionsAlwaysFull session metadata including parent/child links
Prompt batchesAlwaysUser prompts, classifications, plan content
MemoriesAlwaysAll observations (gotchas, decisions, bug fixes, etc.)
ActivitiesConfigurableRaw tool execution logs — can be large. Controlled by backup settings or --include-activities flag

The default backup directory is oak/history/ inside your project. This is designed to be committed to git so backups travel with the codebase.

To use an alternative location (e.g., a secure network share):

  • Set the OAK_CI_BACKUP_DIR environment variable, or
  • Add it to your project’s .env file

Backups use content-based hashing for cross-machine deduplication:

TableHash Based On
sessionsPrimary key (session ID)
prompt_batchessession_id + prompt_number
memory_observationsobservation + type + context
activitiessession_id + timestamp + tool_name

Multiple developers’ backups can be merged without duplicates.

The daemon can create backups automatically on a configurable schedule. This ensures your CI data is always preserved without manual intervention.

Backup settings UI

Automatic backups are disabled by default. Enable them from the Backup Settings card on the Teams page, or via the configuration file:

# In .oak/config.{machine_id}.yaml
codebase_intelligence:
backup:
auto_enabled: true
interval_minutes: 30
SettingDefaultDescription
Automatic backupsOffEnable periodic automatic backups
Include activitiesOnInclude the activities table in backups (larger files)
Backup before upgradeOnAutomatically create a backup before oak upgrade runs
Backup interval30 minHow often automatic backups run (5 min to 24 hours)

The backup interval field appears when automatic backups are enabled. Changes take effect on the next backup cycle.

  • The daemon runs a background loop that checks the interval and creates backups automatically
  • Each automatic backup replaces the previous one for your machine (one file per machine)
  • The “Include activities” setting applies to both automatic and manual backups when no explicit flag is given
  • The CLI --include-activities flag overrides the configured default

When Backup before upgrade is enabled (the default), running oak upgrade automatically creates a backup before applying any changes. This provides a safety net in case an upgrade modifies the database schema.

Terminal window
oak ci backup # Standard backup (uses configured defaults)
oak ci backup --include-activities # Include raw activities (overrides config)
oak ci backup --list # List available backups

Or use the Create Backup button on the Teams page in the dashboard.

Restore your own backup or any team member’s backup:

Terminal window
oak ci restore # Restore your own backup
oak ci restore --file oak/history/teammate_a7b3c2.sql # Restore a teammate's backup

After restore, ChromaDB is automatically rebuilt in the background to re-embed all memories with the current embedding model.

  • Older backup → newer schema: Missing columns use SQLite defaults (usually NULL). Works automatically.
  • Newer backup → older schema: Extra columns are stripped during import. A warning is logged but import proceeds. No data loss for columns that exist in both schemas.

The recommended way for teams to stay in sync. This single command handles the full workflow:

Terminal window
oak ci sync # Standard sync
oak ci sync --full # Rebuild index from scratch
oak ci sync --team # Merge all team backups
oak ci sync --dry-run # Preview without applying changes
  1. Stop daemon — Ensures clean state for data operations
  2. Restore backups — Applies your personal backup
  3. Start daemon — Brings the daemon back up
  4. Run migrations — Applies any schema changes from upgrades
  5. Create fresh backup — Saves current state
FlagDescription
--fullRebuild the entire code index from scratch
--teamAlso merge all team member backups from oak/history/
--include-activitiesInclude the activities table in backup (larger file)
--dry-runPreview what would happen without applying changes

Share your local daemon instance with teammates using tunnels. This gives them read access to your dashboard, search, and session data — useful for pair programming or code review.

Sharing and tunnel UI

OAK supports Cloudflare and ngrok tunnels:

Terminal window
oak ci tunnel-start # Start a tunnel
oak ci tunnel-stop # Stop the tunnel
oak ci tunnel-status # Check tunnel status
oak ci tunnel-url # Get the shareable URL

Configure tunnels to start automatically with the daemon by setting tunnel.auto_start in the configuration.

  • Single developer, multiple machines: Keep your CI data in sync across work and personal machines
  • Team code review: Share a session with a teammate so they can see exactly what the agent did
  • Future: Lays groundwork for shared OAK instances where a team runs a single daemon