Persistent coding runtime on top of codex app-server.
Worker/supervisor orchestration · git-backed memory · evidence-gated completion.
Get Started · CLI · Memory · Contributing · Stars · Contributors · Configuration · Development
- worker/supervisor dual-lane orchestration
- deterministic runtime state machine + dispatch rules
- plan-analysis guardrails and completion gating
- runtime checkpoint persistence + supervisor resume recovery
- worker loop stall guard (repeat/oscillation without plan progress)
- git-backed memory with commit history per agent
- optional git worktree isolation per run
- optional parallel worker lanes (
adaptiveoralways) - parallel helper circuit breaker with cooldown re-enable
- reusable skills from bundled/global/agent/project scopes
- namespaced skill registry + alias/local-first/ambiguous resolution
- skill preference orchestration (
always/prefer/avoid/skill_rules) - runtime skill telemetry + stale-skill diagnostics
RollCode is designed for long-lived agents, not isolated chats.
| Session-based coding CLIs | RollCode runtime |
|---|---|
| conversation state is mostly tied to the current session | agent memory persists across sessions |
| completion can rely on narrative confidence | completion requires supervisor-approved evidence |
memory is often ad-hoc (AGENTS.md, prompt habits) |
memory is a git repo with inspectable history |
| orchestration is implicit | orchestration is explicit (worker -> supervisor -> decision) |
- Bun
>=1.3.0 codexCLI available inPATH(RollCode startscodex app-server --listen stdio://)- a valid Codex provider/account setup
npm install -g @bluemoon-o2/rollcodecd /path/to/your/repo
rollcodeIn launcher:
- run
/codexto configure provider/auth/model - enter your goal in plain language to start the run
git clone <this-repo-url>
cd rollcode
bun install
bun run build
./rollcode.jsrollcode
rollcode --help
rollcode --version
rollcode run "<goal>" [--detach] [--agent <agentId>]
rollcode resume [--run <runId>]
rollcode attach <runId>
rollcode agents
rollcode info
rollcode memory [status|diff|log] [--agent <agentId>]
rollcode doctor [--fix]Notes:
run --detachruns the autonomous loop without opening the interactive TUI (currently in the same process).attachsupports run id prefixes.memoryinspects the current agent by default (or--agent <id>).
Common slash commands during a run:
/supervisor [on|off|status]toggle or inspect supervisor details/resumecontinue autonomous progress/memory [status|profile|remember <text>]inspect memory, view operator profile, or store a durable preference/skillslist resolved skills for this run/skills reloadmanually reload the skill catalog for the active run/doctorrun runtime health checks/doctor fixrun checks and apply safe fixes/hotkeysshow keyboard shortcuts/changelogshow release notes/changelog entries/feedback <message>submit a GitHub Discussion viagh api graphqlin categorygeneral/codexopen Codex provider configuration dialog/exitleave current session
Each agent gets its own git memory repository under:
$ROLLCODE_HOME/agents/<agent-id>/memory
Useful inspections:
rollcode memory status
rollcode memory diff
rollcode memory logMemory files are markdown with frontmatter (description, limit, etc.), and updates are committed so you can audit learning over time.
During turns, RollCode adds task-scoped memory recall from non-system files, and each file's limit bounds how much content can be injected into prompts.
Default memory layout is:
system/identity.md: agent identity and operating rulessystem/project-context.md: durable project contextsystem/operator-profile.md: Letta-style durable operator preference profileproject/*: on-demand project notesepisodes/*: run-level episodic summaries
When operators send steering messages, RollCode can capture durable preference signals into system/operator-profile.md (deduplicated, timestamped) so future runs inherit personalization.
RollCode discovers SKILL.md from:
skills/builtin(bundled)$ROLLCODE_HOME/skills(global)$ROLLCODE_HOME/agents/<agent-id>/skills(agent)<project>/.skills(project)
Priority is: project > agent > global > bundled.
Resolved skills are mirrored for Codex under:
~/.codex/skills/rollcode/shared
If a skill root includes .claude-plugin/marketplace.json, RollCode resolves local
plugin sources and imports each plugin's skills/ directory into discovery.
Skill preferences (optional JSON):
- global:
$ROLLCODE_HOME/skill-preferences.json - project:
<project>/.skills/preferences.json
Supported keys:
always_use_skillsprefer_skillsavoid_skillsskill_rulesskill_aliasesskill_discovery(auto|suggest|off)skill_staleness_days(0disables stale detection)
Key environment variables:
| Variable | Default | Description |
|---|---|---|
ROLLCODE_HOME |
~/.rollcode |
RollCode state root |
ROLLCODE_CODEX_CONFIG_DIR |
CODEX_HOME or ~/.codex |
Codex auth/config directory |
ROLLCODE_CODEX_SKILLS_MIRROR_DIR |
~/.codex/skills/rollcode |
where resolved skills are mirrored |
ROLLCODE_MAX_TURNS_PER_RUN |
24 |
turn cap before supervisor must finish/block |
ROLLCODE_MEMORY_REMINDER_INTERVAL |
12 |
turns between explicit memory reminders |
ROLLCODE_AUTO_RETRY_ENABLED |
true |
enable transient failure retries |
ROLLCODE_AUTO_RETRY_MAX_RETRIES |
3 |
max retry attempts |
ROLLCODE_AUTO_RETRY_BASE_DELAY_MS |
2000 |
retry backoff base delay |
ROLLCODE_AUTO_RETRY_MAX_DELAY_MS |
60000 |
retry backoff max delay |
ROLLCODE_PARALLEL_WORKERS_ENABLED |
true |
enable helper worker lanes |
ROLLCODE_PARALLEL_WORKER_LANES |
2 |
total lanes (primary + helpers) |
ROLLCODE_PARALLEL_EXECUTION_MODE |
adaptive |
adaptive or always |
ROLLCODE_PARALLEL_HELPER_EXECUTOR |
thread |
helper lane executor (thread or process) |
ROLLCODE_PARALLEL_HELPER_ERROR_THRESHOLD |
2 |
helper-error streak to open helper circuit |
ROLLCODE_PARALLEL_HELPER_CIRCUIT_COOLDOWN_TURNS |
2 |
worker turns to keep helper circuit open |
ROLLCODE_LOOP_STALL_REPEAT_THRESHOLD |
3 |
repeated-worker-loop threshold before blocking |
ROLLCODE_SKILL_DISCOVERY_MODE |
auto |
auto, suggest, or off for in-run skill catalog refresh |
ROLLCODE_SKILL_STALENESS_DAYS |
60 |
days without usage before stale-skill diagnostics (0 disables) |
ROLLCODE_WORKER_COLLABORATION_MODE |
plan |
worker turn collaboration mode (default or plan) |
ROLLCODE_SUPERVISOR_COLLABORATION_MODE |
default |
supervisor turn collaboration mode (default or plan) |
ROLLCODE_TASK_ISOLATION_MODE |
none |
none or worktree |
Run checkpoint metadata is persisted per run at:
$ROLLCODE_HOME/agents/<agent-id>/events/<run-id>.checkpoint.json
Session heartbeat/status metadata is persisted at:
$ROLLCODE_HOME/agents/<agent-id>/events/<run-id>.session.json
bun install
bun run build
bun run typecheck
bun run lint
bun test ./test/*.test.ts# 1) bump package.json version
# 2) add matching section in CHANGELOG.md
bun run release:sync-notesnpm publish/bun publish will run prepublishOnly, which executes release:sync-notes and then build.
If the current version section is missing or empty in CHANGELOG.md, publish stops.
Contributions are welcome. See CONTRIBUTING.md for:
- branch/commit expectations
- PR checklist and validation requirements
- AI-assisted contribution policy
- issue templates and triage workflow
Current contributors (from git history):
bluemoon-o2
RollCode is licensed under Apache 2.0. See LICENSE.