Architecture

How Cortex Works

Cortex is a VS Code extension that integrates OpenCode as the agentic runtime (local server). Cortex adds the IDE layer β€” chat sidebar, local codebase context, and Cursor/Windsurf-like workflows β€” inside your own editor. Models come from your OpenCode subscription.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VS Code UI  β”‚ ←→  β”‚ Cortex Ext.  β”‚ ←→  β”‚  OpenCode    β”‚
β”‚  (Sidebar +  β”‚     β”‚ (TypeScript) β”‚     β”‚  (Server)    β”‚
β”‚   Inline)    β”‚     β”‚              β”‚     β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                                  β”‚
                                          β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
                                          β”‚ OpenCode      β”‚
                                          β”‚ models        β”‚
                                          β”‚ (your sub)    β”‚
                                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components

Plan β†’ Build Workflow

  1. Plan mode: Cortex analyzes your request and creates a structured plan with checklist
  2. Approval: You review and approve the plan
  3. Build mode: Cortex implements changes step by step, updating the checklist