Context

How hob keeps the context small, and what it loads into it: instruction files and memory.

Each turn sends the whole conversation to the model again. So each line that goes into the context costs you again on each later turn, until the session ends or you compact it. Most of hob’s design keeps lines out of the context.

Read less

  • index parses a file with tree-sitter and gives its outline: each function, type, and import, with its start and end lines. The model reads the outline first, then only the lines that it needs. Run hob index <file> to see what the model gets.
  • Long bash output keeps its start and its end, because the errors and the test summary are usually at the end.
  • rtk. If rtk is installed, hob uses it to make shell output shorter. hob.setup({ agent = { rtk = false } }) turns that off.

Keep work out of the conversation

  • code_execution runs a Python interpreter (monty) that can call every other tool as an async function. The model filters, sums up, and pipes tool output there, and only the result gets to the context. The interpreter has time and memory limits.
  • task gives side work to a subagent. The model picks a weak, a medium, or a strong model of the provider. The subagent spends its own context on searches and dead ends, and only its summary comes back. Ctrl+X or /tasks shows each subagent in its own window.
  • MCP tools wait behind one tool_search tool. hob sends the definition of an MCP tool only when the model needs it.

Waste no turns

  • Background tasks. Press Ctrl+B on a slow build, a test run, or a subagent. The model gets a short receipt and works on. The result comes back as a message when it is done, so no turn goes to polling. The model can also start work in the background by itself.
  • Cancel with no loss. When you press Esc on a long tool call, the output so far still goes to the model, marked as partial. The next turn does not run it all again.

Watch the cost

The status bar shows the model, the tokens, and the cost of the session at all times.

  • /usage breaks down the tokens by model.
  • /cost shows the spend of each project and session.
  • /compact sums up the conversation and starts the context again from that summary. You can add text that tells it what to keep.

Instruction files

At the start of a session, hob loads the instruction files of the project into the system prompt. It looks in each folder from the Git root down to the current folder, for these files:

AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, COPILOT.md, .cursorrules, .windsurfrules, .clinerules, CONVENTIONS.md, GEMINI.md, and CODING_AGENT.md.

An instruction file in a deeper subfolder loads when a tool call first reads a file in that subfolder.

You can add your own preferences:

  • AGENTS.local.md, in any folder from the Git root down to the current folder, for your own preferences there. Keep it out of Git.
  • ~/.config/hob/AGENTS.md, for preferences that apply to every project.
  • instructions.files in the global init.lua, to replace the list of file names. See Configuration.

Memory

Tell hob to remember something, and the memory tool saves a short note for the project. hob also saves notes by itself sometimes. /memory shows, edits, and deletes the notes. They are in the state folder, under projects/<project-id>/memories/.

Keyboard shortcuts

Go to

On this page

  • jkNext or previous section
  • 12…The section with that number
  • cCopy the install command
  • iDownload
  • dDocs
  • []Previous or next page

Anywhere

  • ?Show or hide this list
  • EscClose, or stop a "g"