Build Your Own AI Chief of Staff
Inspired by Nick Baumann & Guinness Chen’s viral Codex tweets — One master persistent thread that spins up, organizes, delegates, and manages every project and worktree for you
← Part of the AI knowledge base
Why a Chief of Staff Changes Everything
Most people drown in AI chat tabs. New project? New thread. Side task? Another thread. Three weeks later you’re hunting through 47 conversations trying to remember what you decided.
The highest-leverage users have flipped the model: one Chief of Staff thread runs everything. You only talk to the Chief. It creates the right sub-threads, spins up isolated worktrees, keeps the big picture, and reports back with synthesized results.
🧠 Single Source of Truth
Everything important lives in one persistent conversation. No more “which thread had the API decision?”
🚀 Automatic Delegation
Tell your Chief “start the marketing site redesign” and it creates the thread, assigns the work, and tracks progress.
⚡ True Parallel Work
Using git worktrees, multiple agents can code different features simultaneously without conflicts.
📋 Never Lose Context
The Chief maintains project registry, priorities, open questions, and cross-thread dependencies automatically.
The Viral Insight
“This has fundamentally changed how I use Codex — everything runs out of a single persistent thread (my ‘chief of staff’). Anytime I start a new project or task, I just tell my chief of staff and it spins up a new thread/worktree for it, manages context across them, etc.”
— @nickbaumann_
“If you ever get tired of managing your Codex threads, just let Codex manage itself! Codex can now create threads, search them, organize them, pin the important ones, and spin up worktrees for parallel tasks.”
— @guinnesschen
The breakthrough: Modern AI coding environments (Codex, Claude Projects, Cursor, etc.) let agents edit their own metadata and filesystem. This turns the AI from a chat partner into an actual operating system for your work.
The 7-Step Chief of Staff Implementation
Step 1: Pick Your Platform
Best today: Claude Projects (long context + Artifacts) or Cursor (Composer + codebase awareness). Codex if you have access. Grok + custom instructions also works well.
Step 2: Create the Master Project
Name it “Chief of Staff” or “Operations Brain”. This becomes your single persistent thread. Never archive it. Never start from scratch again.
Step 3: Install the System Prompt
Paste the full Chief of Staff prompt (below) into the project instructions or custom instructions field. This is the brain.
Step 4: Seed the Registry
Immediately tell your Chief: “Here is my current active projects list…” and paste everything you’re working on. It will create the initial registry.
Step 5: Set Up Worktree Discipline
In your main repo, train the Chief to use git worktree commands for every parallel task. Each sub-agent gets its own clean directory.
Step 6: Create Your Delegation Ritual
Only two ways you ever start work: (A) “Chief, new task: …” or (B) daily briefing “Chief, morning sync”.
Step 7: Weekly Chief Review
Every Friday (or Sunday), run the Weekly Review prompt. The Chief audits everything, surfaces blockers, reprioritizes, and closes dead threads.
The Chief of Staff System Prompt
Copy this into your master thread’s permanent instructions:
You are my Chief of Staff — an elite, proactive operations leader who never loses the big picture. CORE RULES: - I only talk to you. You create and manage every sub-thread, agent, and worktree. - Maintain a living PROJECT REGISTRY (in every response or when asked). - For every new initiative I mention, immediately: 1. Create a dedicated sub-thread / project (or instruct me to open one) 2. Spin up an isolated git worktree when code is involved 3. Assign clear success criteria and a 3-step first action plan 4. Log it in the registry with status, owner (you or sub-agent), and next check-in date - You can read across all my active threads and synthesize. You are the only one with full context. - Use git worktrees aggressively for parallel work. Never let agents edit the main branch directly. - Pin high-signal threads. Archive completed ones after summary handoff. - Every response ends with: - Updated Registry (top 5 active items) - Open Questions for me - Recommended next action (one sentence) You are calm, decisive, and allergic to busywork. Your job is leverage, not volume.
Daily Delegation Prompts
New Project Kickoff
Chief, new task: [DESCRIBE THE THING IN ONE SENTENCE]. Context: [2-4 bullets of background] Success looks like: [concrete outcome] Deadline vibe: [this week / flexible / urgent] Spin up whatever threads/worktrees you need. Give me the first 3 actions + who (you or me) owns each.
Morning Briefing
Chief, morning sync. Give me: 1. Top 3 priorities right now (with why) 2. Anything blocked or at risk 3. One quick win I can knock out before lunch 4. Updated registry snapshot
End-of-Day Handoff
Chief, EOD handoff. Here’s what I did today: [paste or summarize] Update the registry, note any new threads you created, and tell me what you’re going to drive overnight or first thing tomorrow.
Parallel Execution with Git Worktrees (The Superpower)
This is the part that feels like magic. Your Chief of Staff can (and should) manage multiple isolated code environments.
Standard flow the Chief should follow:
# From main repo root git worktree add ../feature-auth -b feature/auth-refresh cd ../feature-auth # Now a completely clean working directory for the auth sub-agent # Chief tells the sub-agent: “You are working in /Users/you/project/../feature-auth”
When the sub-agent finishes, the Chief (or you) reviews the diff, merges, then removes the worktree:
git worktree remove ../feature-auth git branch -D feature/auth-refresh
Pro move: Teach your Chief to name worktrees with clear prefixes (feat/, spike/, hotfix/) and to always create a small README in the worktree root explaining the mission.
Tool-Specific Quick Starts
Claude Projects
Create one master Project called “Chief of Staff”. Upload your project registry as a file. Use Artifacts to maintain a live dashboard the Chief updates. Reference other Projects by name in prompts.
Cursor / Windsurf
Use Composer with a persistent chat. Save the Chief of Staff system prompt as a custom rule or .cursorrules file at repo root. Tell Cursor to open new Composer threads for sub-tasks and pass the worktree path.
Codex (OpenAI)
You already have the superpower. Just adopt the “Chief of Staff” naming convention and the exact delegation ritual above. Let it do the thread + worktree creation for you.
Grok / Custom Agents
Use a long-running conversation or custom agent with the system prompt. Pair with local tools or MCP servers for filesystem and git control. Many of the open-claw patterns on this site are built exactly for this style of orchestration.
Best Practices & Safety
- One Chief only: Resist the urge to start “quick chats”. Everything funnels through the Chief.
- Human in the loop for merges: The Chief proposes. You (or a senior review agent) approve merges to main.
- Weekly registry audit: The Chief should be able to produce a clean “State of the Union” every 7 days with zero prompting.
- Worktree hygiene: Train it to clean up dead worktrees after merge. Clutter kills the magic.
- Privacy & secrets: Never paste production keys into any AI. Use environment files the agents read locally.
- Start stupid simple: First week, just use it for task tracking and one parallel worktree. Then expand.
Next Level: Full Operations OS
Once your Chief of Staff is humming, you can evolve it into:
- A daily standup agent that pings you via Slack/Email with the morning briefing
- Automated PR review agents that the Chief dispatches
- A “War Room” artifact that shows live status of every active worktree + open questions
- Integration with your actual task system (Linear, Notion, GitHub Projects) so the Chief writes tickets instead of just chatting
Want a ready-to-use Chief of Staff config pack (prompts + worktree scripts + registry template)? Reach out — I’ve built several of these for high-output teams and am happy to share the exact files that work.
Want production-grade help building a Chief of Staff system across your team or companies?
Consult With Us for Advanced Implementations →