Longer tasks across sessions

A task larger than one session, for example a migration or a feature across many files, fills the context window of a session. Answers get slower, more expensive and less precise. The method below keeps each session small and the state of the work in the projectdocs, where the next session reads it.

The AI does each step with its own tools. Your part is to ask for them.

What the AI can do itself

StepToolsMode
Query the codedescribe_symbol, call_chain, code_search, find_similar, find_ui_sourceany
Re-analyse after changesreanalyze_project, sweep_status, statusany
Write plans, summaries, handoversprojectdocs_create_entry, projectdocs_append_entry_sectionBrave
Anchor text to code and commitsprojectdocs_anchor_add, projectdocs_commit_anchor_addBrave
Group the files of a stepchangelists_create, changelists_set_activeBrave
Start the next sessionsession_new_chat_from_entryBrave

Short requests are enough: "Re-analyse before you continue." "Create a changelist for this step." "Anchor the summary to the symbols you changed."

Ask for anchors

The AI writes a summary of its work more readily than it anchors it. Ask for both:

  • Code anchors: "Anchor the summary to the functions you changed." Later, anyone working on such a function finds the summary from the code, in the gutter or through projectdocs_for_symbol.
  • Commit anchor: "Anchor the commit to the entry." A click on the anchor opens the commit in the Git view.

When the AI renames or moves an anchored symbol, it should move the anchors in the same step (spec_reanchor for specs, projectdocs_anchor_remove and projectdocs_anchor_add for projectdocs). Otherwise the anchors become suspect. See Anchors.

Work through a plan in slices

Prerequisite: the session is in Brave mode.

  1. Plan. Ask the AI to write the whole task as a plan in the projectdocs: a phase with slices, each with a goal, the affected areas and a check that tells when it is done.
  2. One slice. Ask the AI to implement the next slice in its own changelist.
  3. Record. At the end of the slice, the AI
    • appends a summary to the plan or writes a summary entry,
    • anchors it to the central symbols,
    • commits and anchors the commit,
    • re-analyses the project.
  4. Hand over. The AI writes a handover section into the entry: what is done, the next slice, the state of the tree with the last commit, open checks, open questions.
  5. New session. Start a new session from the entry (New Chat from this), or let the AI start it with session_new_chat_from_entry. Continue with step 2.

Example request:

Work through phase 12 slice by slice. Create a changelist per slice. After each slice: summary into the plan, anchors on the changed symbols, commit with commit anchor, re-analyse. Then write a handover and start a new session from the plan with the handover as first message.

For a single question or a small fix, a normal session is enough. Ask for the anchors anyway.

Subagents

With Claude (CLI), the session can hand a self-contained part of the work to a subagent: research, a search across many files, a review. The subagent reads in its own context and returns a short result. The main session stays small.

Built-in agents:

AgentTaskDoes not
explorerFind files and symbols, answer factual questions about the codechange anything
researcherResearch libraries, APIs and practices, return a briefdecide for the project
plannerTurn a goal into a step-by-step planimplement the plan
reviewerReview a diff for correctness, style and testsrewrite the code
issue-solverReproduce a bug, find the cause, propose a fixship the fix
summarizerWrite a session summary for the projectdocschange code
ui-designerProduce an HTML/CSS wireframe with accessibility notesbuild the production UI

Subagents run on the Worker Model — Claude (subagents) from the Claude tab of AI Settings, by default Haiku. The code changes stay with the main session, where you see them. Own agents are Markdown files in ~/.codeexplorer/agents/ or .codeexplorer/agents/ of the exploration. See Project context.

Limits

  • The new session knows only what is written down. A decision that is only in the old conversation is lost at the switch.
  • session_new_chat_from_entry opens the session in the Tracemoor window that started the old one.