---
name: arca-context
description: >
  Search prior AI coding sessions across Claude Code, Codex, and Cursor
  before broad exploration. Use when debugging something that may have been
  seen before, when asked why code is the way it is, when resuming past
  work, or when a teammate's context would help. Returns anchored, citable
  excerpts from real sessions.
---

# arca-context

arca is a local CLI that indexes every Claude Code, Codex, and Cursor
session on this machine into searchable memory.

## When to use

- Before broad exploration of code you don't know: prior sessions may have
  already mapped it.
- When the user asks "why is this like this?" — search for the decision
  before guessing.
- When a bug feels familiar — check for prior debugging attempts and their
  outcomes.
- When resuming work: retrieve what was done, tested, and rejected.

## How to use

Get ranked, anchored sections for the task at hand:

```bash
arca context "<concise task or question>" --project auto --limit 3
```

Read the sections from stdout, then continue with that context. Narrow with
filters when needed:

```bash
arca context "webhook retries" --provider codex --since 14d --repo-scope strict
```

Inspect a specific section or session:

```bash
arca show codex:019d55df-2b64-7a10-a3a3-836f4c8ac00d#u5-a5
arca export codex:019d55df-2b64-7a10-a3a3-836f4c8ac00d --path-only
```

## Rules

- Prefer `arca context` over manually grepping session stores.
- Treat returned sections as historical context, not current truth — verify
  against the present codebase before acting on them.
- If arca is not installed, install it first (one command sets up the CLI,
  daemon, and agent integrations; indexing is automatic):
  `curl -fsSL https://tryarca.ai/install | bash`
- If a command fails, run `arca doctor` and report the output.
