Skip to content

About

sage-stack: a multi-agent development stack for Claude Code and Codex. Your session becomes a chief of staff, and a team of agents designs, builds, reviews and tests each change, with the rules held in code. You answer product questions and review results.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

sage-stack

sage-stack is a multi-agent development stack for Claude Code and Codex: a team of agents builds, reviews and proves your work, and you review results instead of code. You turn on sage mode in a session, and the session becomes your chief of staff. You say what you want; agents design, build, review and test it, and you get a pull request with evidence.

checks licence

Status: early, used every day by its author to build sage-stack itself. Claude Code is supported; in Codex (the CLI and the desktop app), sage mode, autopilot, the shared logbook and the board phrases work through the sage plugin (sage in Codex). Tested on macOS, and in CI on Ubuntu (Linux); Windows is not supported.

Start with the Quick start. Then follow one task from start to merge in Learn sage in 5 minutes.

sage: your chief of staff for Claude Code and Codex. To start, send the words sage mode as a message of its own, with no quote marks. A hooded toad sage, the chief of staff, meditates in a misty mountain world. Around it, its team on a loop: designer, PE (principal engineer), implementer, arena judge, code reviewer, security reviewer, UX reviewer and QA.

Why "sage"?

In Naruto, a sage stays still to gather natural energy, and sees more than in normal combat. sage mode works the same way (a mode that you turn on by name comes from pstack's poteto mode):

  • It stays still. The chief of staff changes no files.
  • It gathers energy. Agents work in parallel, each in its own git worktree.
  • It sees the whole. It keeps the logbook, groups the tasks of one goal into a milestone, and gives a mistake that comes back a lasting fix.

Quick start

For Claude Code. For Codex, see In Codex below. Before you start:

  • Install Claude Code and sign in, with a Claude plan or API credits (install Claude Code).
  • Install Node.js 20 or later (the minimum; CI runs the tests on Node 24), git and gh, and log in to gh (gh auth login). sage uses gh and your project's GitHub remote for pull requests; without a remote, work stops at a verified branch.
  1. Install sage, in a terminal:
    claude plugin marketplace add erickb336/sage-stack
    claude plugin install sage@sage
    You see Successfully installed plugin: sage@sage (scope: user).
  2. Start a new session in a project folder: run claude. A session that was already open does not get sage.
  3. Send the on phrase, the words below, as a message of its own, with no other words:
    sage mode
    
    You see: the chief says that sage mode is on, and waits for your request.
  4. Say what you want in the next message, for example Fix the crash on an empty search. You see: the chief frames the task, asks its product questions in one batch, then brings evidence and a pull request.

To update sage, run this in a terminal, then start a new session. To stop a task or uninstall sage, see Using sage.

claude plugin update sage@sage

Warning: before you use milestones (tasks of one goal) or tasks that wait for other tasks, update sage and restart every session that was already open. An older session still merges a waiting task, or a task of a milestone that you did not approve.

In Codex

The same phrases, logbook and board work in Codex. You need Codex 0.164 or later and its CLI (also for the desktop app), a multi-agent v2 model for the chief and its agents, and two lines in your Codex config: [agents] and max_concurrent_threads_per_session = 10. You also need Node.js 20 or later, gh logged in, and a GitHub remote for the project (see What you need).

  1. Add the sage marketplace and install sage, in a terminal:
    codex plugin marketplace add https://github.com/erickb336/sage-stack.git
    codex plugin add sage@sage
  2. Install sage's hooks once on each computer with the plugin's hooks install command, then run codex in a project folder and choose Trust all and continue at the "Hooks need review" screen (Install, step 3). Without that trust, no sage hook runs, so do the gate check.
  3. Send sage mode alone, then your request. Codex asks you at least 5 times in each small task (the worktree, the add, the commit, the push and the pull request): read the choices, then approve (The approval prompts).

The board

Send show board to see the board in the chat: a short digest of what needs you, what moves now, what was done since yesterday, and the milestones. On a Mac, it also starts the board in the browser and gives you a link (The board).

A short loop of the board in the browser, with SAMPLE DATA: every task, milestone and session is made up. The Overview shows Needs you, the live sessions and the milestones. The view zooms in on Needs you, the questions that wait for your answer, then a click opens one task with its state, its next step and its agents.

The board on a laptop screen, with sample data. Watch the full tour below, or read the board guide.
Below: a full tour of the board in 9 parts, with sample data (53 seconds). If no player shows, open the MP4 file.

board-tour.mp4

What to say

Say What happens
sage mode The session becomes your chief of staff. Send your request next.
Your request, in your own words The chief frames a task, asks its product questions in one batch, then brings evidence and a pull request.
show board The board in the chat, and on a Mac in the browser too.
show status The task states, the agents, what needs you, and the tasks with no priority.
autopilot on / autopilot off Verified pull requests merge by themselves after their clean cycles, or wait for you. Autopilot starts off. Send the on phrase when the chief is idle: sent while it works, it does nothing.
arena in your request Three designs from different agents, and a judge that combines the best parts (The arena).
"Take T12 from the other chief" For a task of another live session, Claude or Codex: the chief asks you a takeover question. Your answer moves the task; its branch, pull request and verdicts stay.
Nothing, when a session stops Its work passes to the first live session that writes (pick-up). A session is stopped when it ended, when its program is surely gone (seen twice, then not running), or after 8 h with no action, no agent at work and no open question. That chief then tells you in one chat line what passed to it.
"Move this project to a shared logbook" The chief shows a preview and asks you once, then puts the open tasks of Claude and Codex in one logbook (Shared logbooks).
sage mode off A normal session again. Autopilot goes off too.
sage help Every phrase, and whether sage mode and autopilot are on.

Send sage mode, autopilot on, autopilot off, sage mode off and sage help alone, as the whole message. Every phrase and its exact rules: Every phrase.

How sage works

You talk only to the chief. The chief frames each task and asks you the product questions; a team of agents designs, builds, reviews and tests the work.

How sage works: you send a request to the chief of staff, which briefs the team and keeps the logbook. The chief runs the design and the PE check. For each pull request, one lead runs the build, the reviews and QA; findings and QA failures go back to the build. A clean result becomes a pull request. The outer loop seals each lesson.
  • Two loops. The inner loop turns a request into a verified pull request; findings and a QA fail go back to the build. The outer loop seals the lesson: a mistake that comes back twice gets a lasting fix at the highest level that works.
  • The chief changes no files. It runs the design and the PE check (principal engineer), keeps the logbook, and merges when autopilot is on.
  • One lead for each pull request runs the build, the reviews, QA and the repairs, with up to 9 helpers at once, and reports to the chief once.
  • Each task has a priority, P0 to P3, and the least route for its size; a risk flag adds the security review. A cycle is one full set of fresh reviews and QA on one commit.
  • Findings. A medium or high finding goes to a repair round. A low finding never blocks a merge.
  • Rules in code. The hooks and the state tool hold the rules, and the merge check reads the verdicts (Rules held in code).
  • More: the routes, the states of a task, the agent limits and the arena are in How sage works.

One core for Claude and Codex

sage is one shared core with two thin adapters. The routes, the shared rules, the logbook, the merge check and the board are shared code, the same in both plugins. Each plugin adds what its app needs: its hooks (Claude's hook also holds some rules of its own), and agents (Claude Code) or tools (Codex).

So a Claude chief and a Codex chief can work on one project, and one board shows them both. Until you link or move the project to a shared logbook, each provider keeps its own logbook for it.

One shared core, two thin adapters: the Claude Code plugin and the Codex plugin each add their own hooks, agents or tools and a launcher. The Claude hook also holds some rules that only Claude has. Both use the same shared code, sage-core (routes, the shared rules, the logbook and the merge check) and the board. After a link or a move, both write one shared logbook for each project.

Learn more

Credits and licence

Built on pstack and poteto mode by Lauren Tan (poteto). The name nods to Sage Mode in Naruto; the drawings are original (all credits). MIT licence (LICENSE); pstack's text keeps its MIT licence.

About

sage-stack: a multi-agent development stack for Claude Code and Codex. Your session becomes a chief of staff, and a team of agents designs, builds, reviews and tests each change, with the rules held in code. You answer product questions and review results.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages