goal_state, plan, memory, index, restore_tool_result: the scaffolding that keeps long tasks on track #56
AgentiLoop
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Agent! has a 1.1.x lineup of tools that are easy to overlook because they're not "do the thing" tools — they're the scaffolding that makes long tasks not fall apart. Here's how they fit together.
goal_state— the task can't lie about being doneAt the start of a non-trivial task the model records the goal and a list of verifiable success criteria ("build succeeds", "26 tests pass", "grep returns 0 matches"). Each criterion has to be marked done with evidence — a tool result that proves it. Marking without evidence is rejected. The
donecall is gated on the criteria, so "I fixed it" without a green build doesn't get through.plan— multi-step checklists that survive compactionFor anything touching 3+ files the model creates a plan with numbered steps and updates status as it goes. The open plan is re-attached to the prompt after every context compaction, so a 200-turn refactor doesn't forget step 7 of 12.
memory— durable facts, two scopesA tiny filesystem under
/memories. Global scope is about you and applies everywhere (preferences, "never do X"). Project scope lives in.agent/memory/inside the repo and holds build quirks, conventions, gotchas. The model reads both at the start of every task./memory show|clear|editfrom the prompt bar.index— a repo map without reading every fileindex(action:"create")writes.agent/index/index.jsonl— one JSON line per file with path, size, language, SHA-256, the leading doc comment, and top-level symbols. It's plain JSONL, so any model (or you) can read it directly.appendafter edits touching several files keeps it fresh.restore_tool_result— compaction leaves a way backWhen a tool result is oversized it's spilled to disk at emission time and the context keeps a short preview. If the model later needs the full thing, it calls
restore_tool_result(tool_use_id:)instead of re-running the tool. One reviewer summarized it as: active context holds a small index, disk holds the large result, tokens are spent again only when the agent reopens a particular item.rewind_taskand per-edit snapshotsEvery file edit is snapshotted (1-week TTL). You can roll back a single edit from the UI,
file(action:"undo"), or rewind the entire task's edits in one call.Opt-in critic
Before completion, an optional critic pass reviews the diff and can push back before
doneis accepted.Sub-agents
spawn_agentruns up to 3 concurrent isolated agents (6 if read-only) with their own context and tool loop, per-agent model override, and mailbox messaging viatell_agent. Good for parallel research that shouldn't pollute the parent's context.None of these are magic. They're the boring parts — checklists, evidence, receipts — and they're the difference between an agent that finishes and one that confidently stops halfway. Full list of tools and groups in the README's Tools table.
Which of these do you actually see the model use? Curious what people notice in the activity log.
All reactions