Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.
FAQ
session-orchestrator is a Claude Code plugin with 46 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes architecture, autopilot, bootstrap. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add Kanevry/session-orchestrator> /plugin install session-orchestrator@kanevry
Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.
The same skills and commands run across all four, with platform-adapted hooks and enforcement (see Platform support). Community plugin (MIT, community-maintained) for solo devs and small teams.
Prerequisite: Node.js 24 or later (
node --version). v3.x runs as ES modules and needs a real Node runtime. Install Node.js.
| Platform | Install |
|---|---|
| Claude Code | /plugin marketplace add Kanevry/session-orchestrator then /plugin install session-orchestrator@kanevry (run both inside Claude Code). Also listed on the official community catalog: /plugin install session-orchestrator@claude-community (that catalog can lag HEAD). |
| Codex CLI | git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/codex-install.mjs |
| Cursor IDE | git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/cursor-install.mjs /path/to/your/project |
| Pi | pi install npm:session-orchestrator — or dev-fallback: git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/pi-install.mjs /path/to/your/project --settings-only |
For Claude Code, also install Node dependencies once (hooks import zx) and restart Claude Code:
cd "$(claude plugin dir session-orchestrator 2>/dev/null || echo ~/.claude/plugins/session-orchestrator)"
npm install
Setup guides: Codex · Cursor IDE · Pi. Per-IDE notes on CLAUDE.md vs AGENTS.md: instruction-file-resolution.
STATE.md survives crashes and resumes the next session; /evolve extracts confidence-scored patterns across sessions, nothing hidden./session feature # research + Q&A — inspect git, issues, history, then agree on scope
/go # execute in five typed waves (fixed roles), with a quality gate between each
/close # verify every item, commit cleanly, file carryover issues for the rest
That is the whole loop. /plan and /evolve extend it (see Lifecycle), but you can start with just these three.
Add a ## Session Config section to your project's CLAUDE.md (Claude Code and Cursor IDE) or AGENTS.md (Codex CLI and Pi) — see instruction-file-resolution for which file each platform reads. The smallest valid config is seven fields:
## Session Config
test-command: npm test
typecheck-command: npm run typecheck
lint-command: npm run lint
agents-per-wave: 6
waves: 5
persistence: true
enforcement: warn
Everything else is opt-in. See docs/session-config-template.md for the full template and docs/session-config-reference.md for the canonical type and default reference.
/session, /go, /close, /discovery, /plan, /grill, /evolve, /autopilot, /dispatcher, /reconcile, /eval, /test, /debug, …)Full component inventory: docs/components.md.
flowchart TD
A["/plan [feature|retro]"] -->|optional, defines WHAT| B["/session [type]"]
B -->|research + Q&A| C["/go"]
C -->|5 waves with quality gates| D["/close"]
D -->|verifies + commits| E["/evolve [analyze]"]
E -->|extracts cross-session learnings| B
style C fill:#1f6feb,color:#fff
style D fill:#238636,color:#fff
/plan is optional — you can create issues manually and jump straight to /session. /evolve runs deliberately after 5+ sessions, not automatically.
Most agentic-coding tools jump straight into writing code. Session Orchestrator adds a structured loop on top: research first, agree on scope, then execute in five typed waves with verification gates between them.
flowchart LR
W1["1·Discovery<br/>read-only audit"] --> G1{Gate}
G1 --> W2["2·Impl-Core<br/>primary code"]
W2 --> G2{Gate}
G2 --> W3["3·Impl-Polish<br/>integration, edges"]
W3 --> G3{Gate}
G3 --> W4["4·Quality<br/>simplify + tests"]
W4 --> G4{Full Gate}
G4 --> W5["5·Finalization<br/>commit + close"]
style G4 fill:#d29922,color:#000
When you type /session feature:
/go executes — agents work in parallel within a wave. A session-reviewer audits the output between waves on eight dimensions; only findings at confidence ≥ 80 reach you./close ships it — every planned item is verified, quality gates run full, and unfinished work becomes carryover issues. Files are staged individually, so parallel sessions can't stomp each other.Two complementary commands round out the loop: /plan runs before a session when you need a PRD or retrospective; /evolve runs occasionally to surface patterns across sessions and feed them back at the next start.
The system is markdown-driven config plus a thin Node runtime — skills, commands, and agents are Markdown with YAML frontmatter; scripts/lib/*.mjs and hooks/*.mjs handle dispatch, validation, and telemetry. Everything is plain text: if something goes wrong, you can read every file and see what happened.
STATE.md records wave progress and deviations; the next /session offers to resume from the last completed wave./evolve analyze extracts confidence-scored patterns you can read and prune. Nothing is hidden.Every release is additive and backward-compatible. Highlights of the v3.19.0 line:
sudo/doas/env/nohup/timeout/nice/stdbuf, with depth-capped -c payload recursion) closes six measured bypasses (#982); the blocked-commands policy becomes a floor ∪ overlay model that can only escalate, never weaken (#972); shell redirects gain a target denylist — an &> redirect into a protected instruction file was a silent allow-with-truncation before (#983); and the denylist now resolves absolute paths, not just repo-relative ones.npm audit fix could not reach are closed via package overrides.scripts/release.mjs (#978, local half): a single surfaces table drives version rewrite and preflight (12 version literals across 10 files, CHANGELOG gate, tag/registry collision, drift sweep over all tracked files, CI-green-on-HEAD, leakage gate), and the git tag is created only AFTER a verified npm publish. Found two real gaps on its first run: v3.18.0 had been tagged but never published to npm, and the hidden .codex-plugin manifest was invisible to a plain ripgrep census.Previous line (v3.18.0): panel-follow-ups and consolidation — bash-write-verify self-silencing vectors closed (#938), credential stripping at the source (#907), instruction-corpus diet 471→~440 directives, mutation-sweep-backed test consolidation.
Full version history: CHANGELOG.md.
| Capability | Session Orchestrator | Manual CLAUDE.md | Other orchestrators |
|---|---|---|---|
| Session lifecycle (start → plan → execute → close) | Full, automated | Manual | Partial |
| Typed waves with quality gates | 5 roles, progressive verification | None | Batch execution |
| Session persistence and crash recovery | STATE.md plus memory files | None | Partial |
| Scope and command enforcement hooks | PreToolUse with strict / warn / off | None | None |
| Circuit breaker and spiral detection | Per-agent, with recovery | None | Partial |
| Cross-session learning | Confidence-scored learnings | None | None |
| VCS integration (GitLab + GitHub) | Dual, auto-detected | Manual CLI | Usually GitHub only |
| Session close with carryover | Verified, with issue creation | Manual | Partial |
The design goal is engineering quality: every wave exits verified, every unfinished issue gets a carryover ticket, every session closes with a clean commit. A detailed head-to-head vs. maestro-orchestrate is in docs/components.md.
| Feature | Claude Code | Codex CLI | Cursor IDE | Pi |
|---|---|---|---|---|
| All 24 commands | Native slash commands | Native plugin commands | Rules-based (.mdc) | Prompt templates |
| Parallel agents | Agent tool | Multi-agent roles | Sequential only | Sequential (parallel planned) |
| Session persistence | .claude/STATE.md | .codex/STATE.md | .cursor/STATE.md | .pi/STATE.md |
| Scope enforcement | PreToolUse hooks | Unavailable — pending a real apply_patch adapter | afterFileEdit (post-hoc) | tool_call bridge |
| AskUserQuestion | Native tool | Numbered-list fallback | Numbered-list fallback | Numbered-list fallback |
| Quality gates | Full | Full | Full | Full |
All platforms share the same skills, commands, and scripts; hooks use platform-specific adapters and event subsets. Codex intentionally wires only its six supported project event slots and omits Claude-only events plus Edit/Write payload handlers until a real Codex apply_patch adapter exists, so scope enforcement is currently unavailable there. Platform detection and adaptation live in scripts/lib/platform.mjs. OS: macOS and Linux are first-class and run in CI (ubuntu-latest, macos-latest). Windows runs natively (all paths via path.join, tmp via os.tmpdir()) but is not covered by CI — treat it as best-effort and run smoke tests locally when changing OS-sensitive code. Cursor and Pi have known event-coverage caveats — see docs/cursor-setup.md and docs/pi-setup.md.
Codex plugin or hooks not loading. Start with codex plugin list --available --json. Confirm session-orchestrator@kanevry is installed, enabled, unique, and at the tracked manifest version; then start a fresh task and review /hooks. Remove only the two allowlisted legacy IDs through codex plugin remove, and resolve marketplace conflicts through the public marketplace remove/add lifecycle before reinstalling. Any other pre-public plugin/config/cache/hook-state residue is unsupported: do not modify private Codex files; file an issue with codex --version plus the public plugin and marketplace list output. The full decision tree is in docs/codex-setup.md.
"'node' not found on the hook PATH — plugin hooks are skipped." The harness executes hook commands via /bin/sh -c with its own PATH — that shell does not source ~/.zshrc/~/.bashrc, so Node installed via Homebrew (/opt/homebrew/bin), nvm, volta, or asdf can be invisible to hooks even though node works fine in your terminal. All hook commands route through hooks/run-node.sh, which resolves Node via $SO_NODE_BIN → PATH → well-known install dirs → nvm and degrades gracefully when nothing is found: hooks are skipped with one warning per 6 hours instead of a shell error on every tool call. Fixes, in order of preference: launch the harness from a shell where node resolves; export SO_NODE_BIN=/abs/path/to/node; or install Node 24+ to a standard location.
hooks/pre-bash-destructive-guard.mjs blocks destructive shell commands (git reset --hard, rm -rf, git push --force, and more) in the main session and in subagent waves. Policy lives in .orchestrator/policy/blocked-commands.json. Bypass per session only for intentional maintenance:
allow-destructive-ops: true
The rule source of truth is .claude/rules/parallel-sessions.md (PSA-003), vendored to consumer repos via /bootstrap.
git clone https://github.com/Kanevry/session-orchestrator.git && cd session-orchestrator
npm install
npm test # vitest
npm run lint # ESLint v10 + Prettier
npm run typecheck # node --check on every .mjs file
.npmrc ships with ignore-scripts=true (supply-chain defence), so Husky git hooks don't auto-wire on install — run npx husky once after cloning. git commit then runs gitleaks → owner-privacy scan → lint-staged → commitlint. CI re-runs everything, plus more.
Two directories share the name rules and play opposite roles: rules/ is the deliverable rule library shipped out to consumer repos via /bootstrap --sync-rules, while .claude/rules/ is this repo's own always-on rule set.
Contributor docs: Plugin Architecture (v3) · CONTRIBUTING.md · agent authoring spec.
Session Orchestrator is provided as-is — a community project with no SLA, no commercial support contract, and no guaranteed response time. Maintenance is best-effort.
What it is not:
We follow Conventional Commits — see CONTRIBUTING.md.
This plugin is a methodology turned into code. If you want the reasoning behind it — why execution runs in waves, why every wave ends at a verification gate, how to make an autonomous loop that actually finishes — those playbooks are taught hands-on at agenticbuilders.at:
The plugin is free and MIT. The courses are for going deeper, not a requirement for using it.
.claude/
.claude-plugin/
marketplace.json
plugin.json
loop.md
rules/
anti-pattern-a-file-wide-tocontain-in-a-test-that-judges-one-block-passes-for-states-the-block-never-reaches-529485a.md
anti-pattern-a-green-quality-gate-on-the-development-platform-is-not-evidence-the-tree-builds-on-ci-0de02f9.md
anti-pattern-a-nul-byte-in-a-tracked-production-file-makes-it-invisible-to-every-grep-based-audit-0fcf316.md
anti-pattern-a-protocol-migration-census-keyed-on-the-payload-misses-every-consumer-that-pins-only-the-channel-18f3d0a.md
anti-pattern-agents-md-description-frontmatter-must-be-inline-string-not-yaml-block-scalar-a462fce.md
anti-pattern-console-log-process-exit-drops-stdout-above-the-pipe-buffer-on-an-exit-0-protocol-that-means-fail-open-91c32e4.md
anti-pattern-prose-presence-pin-tests-mechanically-identifiable-no-product-import-no-spawn-fs-only-and-safely-deletable-in-bulk-58983e0.md
anti-pattern-validate-config-cli-exit-code-is-not-a-schema-gate-under-enforcement-warn-73b1249.md
anti-pattern-vi-restoreallmocks-doesn-t-clear-vi-fn-call-history-from-a-vi-mock-factory-5f34cb8.md
ask-via-tool.md
bash-harness-pitfalls.md
cli-design.md
development.md
fragile-file-quality-gate-wrapper-needs-large-output-buffer-and-env-isolation-1f999bc.md
loop-and-monitor.md
lsp.md
mvp-scope.md
owner-persona.md
parallel-sessions.md
proven-pattern-moving-a-guard-from-exit-code-signalling-to-stdout-json-inverts-its-failure-direction-re-verify-every-deny-path-afterwards-3aeb9fc.md
proven-pattern-nul-byte-corruption-needs-a-byte-level-pre-commit-gate-posix-tr-cmp-is-the-only-portable-detector-9d8032c.md
quality-gates-autofix.md
receiving-review.md
recurring-issue-session-registry-fresh-claim-files-must-be-age-gated-f1f3be4.md
security.md
test-value.md
testing.md
verification-before-completion.md
settings.json
.claudeignore
.codex-plugin/
agents/
explorer.toml
session-reviewer.toml
wave-worker.toml
config.toml
plugin.json
.cursor/
rules/
000-session-orchestrator.mdc
010-session-workflow.mdc
020-quality-gates.mdc
030-wave-execution.mdc
040-discovery.mdc
050-plan.mdc
060-evolve.mdc
070-gitlab-ops.mdc
080-ecosystem-health.mdc
.editorconfig
.env.example
.git-blame-ignore-revs
.gitattributes
.github/
ISSUE_TEMPLATE/
bug_report.md
feature_request.md
pull_request_template.md
workflows/
test.yml
.gitignore
.gitlab-ci.yml
.gitleaks.toml
.husky/
commit-msg
pre-commit
pre-push
.lintstagedrc.mjs
.mcp.json
.npmrc
.nvmrc
.orchestrator/
bootstrap.lock
peers/
AGENT.md
USER.md
policy/
blocked-commands.json
ecosystem.schema.json
quality-gates.example.json
quality-gates.schema.json
templates-policy.json
test-profiles.json
steering/
product.md
structure.md
tech.md
.prettierignore
.prettierrc
.vault.yaml
agents/
AGENTS.md
analyst.md
architect-reviewer.md
code-implementer.md
db-specialist.md
dialectic-deriver.md
docs-writer.md
eval-judge.md
memory-proposal-collector.md
qa-strategist.md
schemas/
analyst.schema.json
architect-reviewer.schema.json
code-implementer.schema.json
db-specialist.schema.json
docs-writer.schema.json
persona-panel-sidecar.schema.json
qa-strategist.schema.json
security-reviewer.schema.json
session-reviewer.schema.json
test-writer.schema.json
ui-developer.schema.json
ux-evaluator.schema.json
security-reviewer.md
session-reviewer.md
skill-applied-judge.md
test-writer.md
ui-developer.md
ux-evaluator.md
assets/
icon.svg
og-card.png
og-card.svg
CHANGELOG.md
CLAUDE.md
CODE_OF_CONDUCT.md
CODEOWNERS
commands/
autopilot-multi.md
autopilot.md
bootstrap.md
brainstorm.md
close.md
contract-version-bump.md
debug.md
discovery.md
dispatcher.md
eval.md
evolve.md
go.md
grill.md
harness-audit.md
memory-cleanup.md
persona-panel.md
plan.md
portfolio.md
reconcile.md
repo-audit.md
session.md
spinout.md
sunset-review.md
templates-ack.md
test.md
commitlint.config.mjs
CONTRIBUTING.md
docs/
adr/
0001-context-vs-orchestration.md
0002-agent-teams-substrate.md
0003-routines-cloud-execution.md
0004-context-mode-tool-output-sandbox.md
0005-ears-notation-plan.md
0006-prompt-hook-continueonblock.md
0007-tmux-visualization-substrate.md
0008-worktree-cleanup-ordering.md
0009-worktree-path-layouts.md
0010-native-autonomy-commands.md
2026-05-10-364-remote-agent-substrate.md
2026-05-10-365-mcp-tool-adapter-debug.md
2026-05-10-spike-cluster-cross-connections.md
2026-05-10-spike-cluster-risks.md
changelog/
v1.md
v2.md
ci-setup.md
codex-setup.md
components.md
cursor-setup.md
distribution/
2026-07-18-distribution-options.md
announce-kit.md
masterclass-outline.md
npm-publish-checklist.md
submission-kit.md
eval/
aiat-llm-eval-v1.md
events-schema.md
examples/
express-api-config.md
integration-test-config.md
nextjs-config.md
swift-ios-config.md
instruction-delivery.md
migration-v3.md
mutation-testing/
2026-07-31-report.md
owner-config-schema.md
persona-panel.md
pi-setup.md
plugin-architecture-v3.md
pm-skills-marketplace.md
policy-cache-validation-2026-04-28.md
prd/
2026-07-25-session-orchestrator-com-redesign.md
README.md
recipes/
quality-gate-container-pattern.md
reconcile/
2026-07-31-opus5-config-pin-review.md
2026-07-31-reconcile-candidates.md
rule-authoring.md
session-config-reference.md
session-config-template.md
sunset-review/
2026-07-31-report.md
telemetry/
telemetry.md
deploy-runbook.md
telemetry-claims.md
templates/
AGENTS-session-config.md
USER-GUIDE.md
vault-docs-architecture.md
eslint.config.js
evals/
instruction-ablation/
cases/
psa-003-foreign-work.json
sec-007-sql-parameterisation.json
vbc-001-verify-before-claiming.json
README.md
run.mjs
hooks/
_lib/
guard-source-loader.mjs
lock-bootstrap.mjs
lock-reconcile.mjs
profile-gate.mjs
transcript-history.mjs
vcs-create-matcher.mjs
agent-teams-h3-test.sh
config-protection.mjs
cwd-change-restore.mjs
enforce-commands.mjs
enforce-scope.mjs
hooks-codex.json
hooks-cursor.json
hooks-pi.json
hooks.json
loop-guard.mjs
on-session-end.mjs
on-session-start.mjs
on-stop.mjs
operator-steer.mjs
post-bash-write-verify.mjs
post-edit-validate.mjs
post-subagent-discovery-validator.mjs
post-tool-batch-wave-signal.mjs
post-tool-failure-corrective-context.mjs
post-tooluse-frontend-slop.mjs
pre-bash-destructive-guard.mjs
pre-bash-issue-budget.mjs
pre-bash-memory-propose-audit.mjs
pre-bash-sessions-ledger-guard.mjs
pre-bash-staging-fence.mjs
pre-bash-templates-first.mjs
run-node.sh
skill-invocation-telemetry.mjs
subagent-telemetry.mjs
wave-scope-commit-guard.mjs
LICENSE
monitors/
monitors.json
NOTICE
output-styles/
finding-report.md
session-report.md
wave-summary.md
package-lock.json
package.json
pi/
extensions/
session-orchestrator.ts
prompts/
autopilot-multi.md
autopilot.md
bootstrap.md
brainstorm.md
close.md
contract-version-bump.md
debug.md
discovery.md
dispatcher.md
eval.md
evolve.md
go.md
grill.md
harness-audit.md
memory-cleanup.md
persona-panel.md
plan.md
portfolio.md
reconcile.md
repo-audit.md
session.md
spinout.md
sunset-review.md
templates-ack.md
test.md
README.md
rules/
_index.md
always-on/
commit-discipline.md
npm-quality-gates.md
parallel-sessions.md
opt-in-domain/
prompt-caching.md
opt-in-stack/
backend-data.md
backend.md
frontend.md
security-web.md
swift.md
README.md
scripts/
archive-closed-prds.mjs
autopilot-multi.mjs
autopilot.mjs
backfill-abandoned-sessions.mjs
backfill-learnings-expires.mjs
backfill-learnings.mjs
backfill-sessions.mjs
check-doc-consistency.sh
check-package-manager.mjs
ci/
assert-vitest-green.mjs
codex-install.mjs
compute-grounding-injection.sh
cursor-install.mjs
dialectic-deriver.mjs
emit-event.mjs
emit-session.mjs
eval-session.mjs
export-hw-learnings.mjs
fleet-instruction-scan.mjs
gc-stale-worktrees.mjs
generate-pi-prompts.mjs
harness-audit.mjs
lib/
agent-frontmatter.mjs
agent-output-schema.mjs
agent-status.mjs
ajv-loader.mjs
auto-dialectic.mjs
auto-dream.mjs
autonomy/
suitability.mjs
autopilot/
autopilot-telemetry.mjs
autopilot.mjs
dep-graph.mjs
durable-telemetry.mjs
flags.mjs
kill-switches.mjs
loop.mjs
mr-draft.mjs
multi-killswitch.mjs
recent-runs.mjs
stall-sampler.mjs
telemetry.mjs
worktree-pipeline.mjs
backlog-scan.mjs
blocked-commands-policy.mjs
bootstrap-lock-freshness.mjs
bootstrap-lock-refresh.mjs
build-live-signals.mjs
ci-status-banner.mjs
claude-md-budget-lint.mjs
cli-flags.mjs
codex/
plugin-contract.mjs
cold-start-detector.mjs
command-blocker.mjs
common.mjs
config/
config-schema.mjs
config.mjs
auto-dream.mjs
block-header.mjs
broken-window.mjs
coercers.mjs
cold-start.mjs
config-protection.mjs
... 1453 more© 2026 Flowy · Free and open source
Built for Claude Code · Not affiliated with Anthropic