Chief v2
Chief v2 is a set of additions that make Chief cheaper to run and easier to check. It is off until you turn it on, and one switch turns on all of it.
What it adds
- Records. Every task gets a record: where it went, which model, how many tokens, and how it ended.
- Task packs and lean workers. Chief hands a new session a short pack of eight fixed sections (goal, which files it may change, what to read, where to look, rules, how to check the work, how to ship, what to report). It stays under 80 lines, with your project's short mission, tech and roadmap notes in front. The session starts in safe mode, so it loads far less at startup.
- Secrets fenced. Workers get deny rules for
.envfiles, keys and credential files, and Chief refuses a pack that names one. - Routing by rule. Where a task goes and which model does it follow fixed rules. See Chief routing.
- Project map.
melta-chief mapwrites one line per folder of a project, so a pack can point to the right place. - Sleep and wake. A session that finished or sat idle is put to sleep to free memory, and wakes with one tap. See Sleep and wake below.
- Memory. Chief keeps dated notes about each session, refreshes a session from them instead of compacting it, and tells each new task what is already known. See Memory below.
- Self-reset and the weekly review. Chief keeps a short ledger and clears its own chat when it grows big. Each Monday it proposes rule changes for you to approve. See Records and the weekly review.
Sleep and wake
Every Claude Code or Codex session keeps a process running on your computer, even when nothing happens in it. Chief puts a session to sleep once it has finished its task or sat idle for 90 minutes: its pane closes, which frees the memory, and its conversation stays on disk. When the computer is short of memory (under 1.5 GB free, or swap over 80% used with under 3 GB free), idle sessions sleep after 5 minutes instead, the longest-idle first.
On the computer's screen in the app, a sleeping session shows as a Sleeping card with one button, Wake. Wake opens a new pane in the same folder and resumes the same conversation, with the same model and effort. If it can't (its account is at its limit and another one takes over, or the resume fails), the new session starts from a short summary written when it went to sleep, and the card says Woke with a summary.
Chief never puts to sleep a session that is working, waiting for an answer or has queued tasks, the pane in front of you on the computer, or Chief itself. Sleep never deletes or moves a conversation, and never touches the session's folder or uncommitted work.
Change the wait in Settings › Chief › Sleep idle sessions after (15, 30, 60 or 90 minutes, or Never), or run melta-chief sleep-after 15 on the computer. melta-chief sleeping lists sleeping sessions and melta-chief wake <id> wakes one; you can also ask Chief to wake one. Sessions sleep while Chief is running on that computer. The app updates an older Chief there on its own; sleeping starts the next time Chief starts.
Memory
Chief keeps a memory of every session it runs, itself included. A few minutes into the work, a small model reads what happened in the session and writes short, dated notes about it: decisions and why, files changed, commands and their results, facts learnt, open questions, and anything you corrected. Facts carry the date they were true; a fact that changes is closed with a date, not deleted. Once a day, or when a session's notes grow long, earlier days are condensed into a few lines at the top, and the full notes move to an archive next to them.
Everything is written to ~/Melta Chief/memory on your computer: one file per session, plus a short index. Nothing goes to Melta's servers. Chief writes these files itself; nobody needs to edit them. With Melta Notes on the computer, the same files show up under Chief memory in Notes, so Ask the notes can answer from them.
Refresh instead of compact. When a session's conversation grows past Chief's limit and more work is waiting for it, Chief refreshes it: the session writes a handoff, its conversation is cleared, and it carries on from the memory index, its own notes and the handoff. The task record shows it as Refreshed from memory · 92K → 14K. If the handoff is incomplete, Chief keeps the conversation and compacts it instead, and the record says so.
What we already know. When Chief starts a task, it searches your notes, the session memories, earlier handoffs and your project's rules once, and adds the few things that matter to the end of the task's first message. The task record shows Recalled 3 things we knew. A memory Chief showed a worker and the worker repeated is not noted again and never counts as stronger evidence. A remembered fact about a file that has changed since is shown marked code changed since recorded, or left out when it was only a guess. When a task finishes, Chief adds a dated line about it to the matching note in Melta Notes.
How much to recall. Chief first picks a memory level from the kind of task. A small docs, test or fix task that names its file or error gets Level 0: nothing extra. Most tasks get Level 1: up to 1,500 tokens. A question that weighs choices ("should we", "compare", "why did we") gets Level 2: up to 6,000 tokens. The task record shows one line, for example Memory: Level 1 · 1,180 tokens. If a message changes its mind halfway ("set up Express, actually use Fastify"), Chief plans from the later instruction. To go back to one recall size for every task, set "memory": { "router": false } in chief.json.
On the computer's screen in the app, a task card shows one muted line, Memory · 14 observations · 2 min ago. Tap it to read What Chief remembers: anything Chief needs you to settle first, then the condensed notes, then each day's notes, newest first.
Everything Chief remembers, in one place. Settings › Chief › What Chief remembers, or More › What Chief remembers on a computer's screen, shows what Chief keeps on that computer, folder by folder: facts with how sure Chief is and the day they were true, your corrections and commands that kept failing in tasks, the newest sessions' notes, and Chief's skills with how often their tasks landed first try. Search filters the list. Tap a line to read it whole; hold it to edit or delete it. An edited fact becomes your correction, dated today, and the old one is closed, not deleted. Every change runs melta-chief on the computer, which hides keys and passwords first; the app never writes the files. A fact deleted from the memory ledger comes back with melta-chief ledger undo, and a changed or deleted skill with melta-chief rollback. The screen needs melta-chief 0.1.63 and offers Update Chief on an older one.
Memory is on by default and costs a few tokens per minute of work. Turn it off in Settings › Chief › Memory, or run melta-chief memory-observer off on the computer. melta-chief memory <pane> prints a session's notes and melta-chief recall "why did we skip the webhook test" answers a question from them.
Where Chief keeps what
~/Melta Chief/
├── CHIEF.md
├── CLAUDE.md
├── chief.json
├── decisions/
│ ├── RULES.md
│ ├── SECURITY.md
│ └── <project>/
├── derived_memory/
│ ├── INDEX.md
│ ├── ledger.sqlite
│ └── <project>/
├── memory/
├── handoffs/
├── records/ packs/ skills/
└── learning/ doors/ notes/
decisions/ is yours: agents only read it. RULES.md there is Chief's rules in short form, kept up to date until you edit it (then Chief leaves it as you wrote it), and SECURITY.md lists the files no agent opens. Your own decision notes per project can go next to them. derived_memory/ is written by Chief: a short INDEX.md it reads at every start and never changes while you work, and for each project what it learnt (STACK.md, ARCH.md, INVARIANTS.md). memory/ holds each session's raw notes. CHIEF.md is a short header that reads RULES.md and INDEX.md; your own rules for Chief stay in CLAUDE.md.
On a computer with Chief v2, the next update switches Chief's folder to this layout once. It copies and never deletes, and every file it shortens (older handoffs, Chief's project notes) keeps a .bak copy next to it. To undo it, run melta-chief layout rollback on the computer.
Memory ledger
Next to the notes, Chief keeps every fact it learns in one small database, derived_memory/ledger.sqlite: what was true, from when to when, how sure it is (your correction, something you said, something a tool showed, or Chief's own reading) and where it came from. When a fact changes, the old one is closed with a date and the new one takes its place. A weaker source never overrules a stronger one: it is kept as disputed until you settle it. Facts that rested on a closed one are marked to check again. Nothing is deleted, and every change can be undone.
For now the ledger only records. Starting a task, recall and the memory index still read the notes, and Chief writes down each time the ledger would have answered differently, in records/memory-shadow.jsonl. After two weeks in which it disagrees on fewer than 2 recalls in 100, you can let it answer: set "memory": { "ledger": "on" } in chief.json. "off" stops it and keeps the file.
melta-chief ledger status says what it holds. melta-chief ledger search "database" and melta-chief ledger trace repo:melta/server uses_db look inside, melta-chief ledger compare shows your last three tasks' tokens with and without it, and melta-chief ledger export prints all of it as JSON. It needs Node.js 22.13 or newer on the computer; with an older Node, memory keeps working from the notes alone. melta-chief memory-view lists what Chief remembers by folder, and melta-chief memory-edit <id> (the new text on stdin) and melta-chief memory-forget <id> change or take out one line, as the app does; a ledger fact taken out is retracted with the reason, so melta-chief ledger undo brings it back.
What runs in the background and what it costs
Two helpers keep memory tidy without you. With Chief v2 both are on by default. Neither one ever holds up a task or a start: Chief starts them on the side, and one that fails writes a line and tries again later.
- Observer daemon. Writes a session's notes once it has done about 30,000 tokens of new work, at least 5 minutes after the last notes, and only while the session is idle. Runners and reviewers are skipped.
- Sleep loop. Once a night (or after 90 minutes with no prompt from you), it condenses earlier days, settles facts in the memory ledger, merges notes said twice, moves notes older than a week to the archive, shortens each project's notes and rewrites
derived_memory/INDEX.md. It is the only thing that rewrites the index, so the start of every Chief turn stays the same all day. The night is the 3 quietest hours in your own last two weeks of tasks, or 02:00 to 05:00 until there are enough tasks to tell.
What it costs. Each call picks the cheapest way it has. With an API provider added in melta-chief accounts, it uses that provider's small model. Otherwise it uses your Claude subscription's Haiku, at most 60 Observer passes and 6 Sleep loop runs a day ("daemonBudget": { "observe": 60, "reflect": 6 } in chief.json's memory), and it rests for an hour after your subscription hits a usage limit. When none of that is available, it writes simple notes without a model: files changed, commands run and whether they failed, and where you changed your mind. Every call is a line in records/daemon.jsonl, and the weekly review adds them up in one line.
Shadow. Each helper has three settings: off, shadow and on. In shadow the Observer daemon changes nothing and only writes down where it would have run. The Sleep loop in shadow writes its index to derived_memory/.sleep/INDEX.next.md and its shortened project notes to .pass3.md files next to the real ones, so you can compare them before anything reads them. Use it when you want to try a helper safely; you don't have to.
Turn them off. Both run unless chief.json says otherwise. On the computer, melta-chief daemon off turns both off, and melta-chief daemon observer off or melta-chief daemon sleep off turns one off. shadow in place of off makes one only write down what it would do, and on turns it back on. melta-chief daemon status says what each one does now, which way it pays and how much of today's budget is used, and adds "(default)" when you have not set it.
The Observer daemon adds two hooks to Chief's own session (in .claude/settings.json inside Chief's folder, never your own settings) that write a line when a tool runs and when a turn ends. They never call a model. melta-chief setup --no-hooks takes them out. Chief's setup also runs the Sleep loop at 03:00 when Chief is not running; melta-chief setup --no-daemon leaves that out.
Turn it on
In the app, tap Routing on the host screen, then Turn on Chief v2. Or run melta-chief v2 on on the computer. The switch is kept in Chief's folder, so it works however the app or Chief starts. CHIEF_V2=1 in the environment still turns it on too. Then start Chief again. melta-chief v2 status says whether it is on, and which switch did it.
Common questions
Is it on by default?
No. Chief works as before until you turn it on.
Does it change sessions that are already running?
No. Packs, lean starts and models apply to sessions Chief starts after you turn it on.
What if I turn it off again?
Run melta-chief v2 off (and remove CHIEF_V2=1 if you set it), then start Chief again. Chief goes back to its first behaviour; its records stay in its folder.
Can I bring a sleeping session back from a terminal?
Yes. A sleeping Claude Code session is an ordinary saved conversation: claude --resume in its folder brings it back too, and its Sleeping card goes away.
Where do packs, records and memory live?
In Chief's own folder on your computer. Nothing goes anywhere else.