December v0.4.19

Agent Reasoning Loop

Learn how December reads your code, makes changes, and checks its work.

This page helps you understand how December works on a task, from your prompt to the final answer.

The four steps

December is told to work in four steps: inspect the code, plan the change, edit the files, and verify the result.

01

Inspect

Find and read the files that matter.

02

Plan

Decide which files to change.

03

Execute

Edit the files and run commands.

04

Verify

Run the tests or build, and fix what fails.

These steps come from the instructions that December gives the model. The loop below is the mechanism that does the work.

How the loop works

Each request is a loop of model turns:

  1. December sends your prompt, the conversation, and the list of tools to the model.
  2. The model answers with text, tool calls, or both.
  3. December runs the tool calls and adds the results to the conversation.
  4. December sends the conversation back to the model, and the next turn starts.

The loop stops when the model answers without a tool call. The loop also stops after 100 turns, or when you press Ctrl+C.

1. Inspect

December reads your code before it changes it. In the CLI, December uses read_file to read a file. It uses bash to run search commands, such as grep.

In December Cloud, December also has grep_search to search file contents, find_files to find files by name, and list_dir to list a folder.

December runs read-only tool calls at the same time, so the inspect step is fast. December also reads your rules and memory when a session starts. See Workspace Memory & Rules.

2. Plan

For a change to many files, December breaks the work into small steps. It names the files to change and the tests that prove the change works.

To see and approve the plan before December edits files, use /plan. See Session Artifacts & Planning.

3. Execute

December changes your project with these tools:

  • edit_file replaces text in a file. December uses it for most edits.
  • write_file makes a new file or replaces a whole file.
  • bash runs a shell command, for example to install a package or run a formatter.

December runs edits and commands one at a time, in order. If toolPermission is "always-ask", December asks you before edits and commands that change your project. See Configuration.

4. Verify

December runs your tests, build, or linter with bash. The output of the command goes back into the conversation. If a check fails, the model reads the error and makes a new edit. Then it runs the check again.

After each edit, December can also get errors from a language server for that file. If the file has errors, December adds them to the tool result, so the model can fix them.

Long sessions

A long session can fill the context window of the model. When this happens, December summarizes the older messages. The summary takes the place of the older messages, and the session continues.

For a large side task, December can start a subagent with the invoke_subagent tool. A subagent is a separate agent with its own context. It does the task and sends back only the result.