---
title: "coding.sh ingest · coding.sh docs"
description: "Move captured hook events from the spool into the index. Every option of coding.sh ingest, from its own --help."
canonical: https://coding.sh/docs/cli/ingest
human_url: https://coding.sh/docs/cli/ingest
markdown_url: https://coding.sh/docs/cli/ingest.md
agents_url: https://coding.sh/agents.md
llms_url: https://coding.sh/llms.txt
updated: 2026-11-11
---

# coding.sh ingest

Move captured hook events from the spool into the index. Every option of coding.sh ingest, from its own --help.

coding.sh ingest --help

```
coding.sh ingest [options]

  Move captured hook events from the spool into the index

Options
      --backfill       Also import agents' local transcript history
      --rebuild        Re-parse every stored session (of --agent) from its transcript and spool with the current adapters
  -a, --agent <AGENT>  Only this agent (repeatable, or a comma list: a,b)
      --since <WHEN>   Only at or after this time: 7d, 12h, 30m, today, yesterday or a date. A date without a zone is local time: 2026-11-09 is local midnight
      --background     Don't wait for another ingest; exit quietly if one is running. With --backfill, imports history unless another import is running

Examples
  coding.sh ingest
  coding.sh ingest --backfill --since 30d
  coding.sh ingest --rebuild --agent pi

Notes
  Rarely needed: read commands, the viewer and the MCP server ingest first, and the hook starts one when a session ends.
  After an upgrade, sessions stored by an older adapter parse are re-parsed in the background. --rebuild does it for every session now; a session whose transcript and spool lines are gone keeps its rows, minus duplicates, and one the adapter now reads as a copy of another stored session is removed.
  Run in the foreground, it also folds sessions that have events but no session row, and sessions tagged fold:error; doctor counts both.
```

[All commands](https://coding.sh/docs/cli) · [Global options](https://coding.sh/docs/cli#global)

To set coding.sh up for a user, follow the agent workflow at [/agents.md](https://coding.sh/agents.md).
