chat_history_read
Recover context from past chat sessions by reading recent history entries, including decisions, notes, and phase markers. Filter results by session, entry type, or count.
Instructions
Read recent entries back from the consumer project's chat-history JSONL (agents/runtime/.agent-chat-history; agents/.agent-chat-history accepted for back-compat). Use to recover context from an earlier session — decisions, notes, phase markers — at the start of a new task. Read-only. Returns the resolved file path plus a list of matching entries (newest last). Combine session, last, and entry_type to narrow the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | Return only the most recent N entries, after other filters apply. | |
| path | No | Optional history-file path override; defaults to the standard chat-history location under the project root. | |
| around | No | Timeline anchor: return the entries around this ref (from a detail:"index" row) instead of the filtered list — depth_before/depth_after neighbours plus the anchor. Refs are within-file ordinals; rotation invalidates them. | |
| detail | No | 'index' returns compact rows (ref, t tag, ~100-char preview, tokens_estimate) instead of full entries — scan first, then re-read the refs you need via `around` or a narrowed filter. History entries are large, so index mode pays off here. 'full' (default) returns complete entries. | full |
| session | No | Filter to a single 16-char session id. | |
| entry_type | No | Filter by the `t` tag (e.g. note, decision, phase). | |
| depth_after | No | Neighbours after the anchor (with `around`). Defaults to 3. | |
| depth_before | No | Neighbours before the anchor (with `around`). Defaults to 3. |