Harvest durable knowledge from past Claude Code and Codex conversations in batch. Use when asked to document what many past sessions established (sessions that ended without checkpoint learning), to run a periodic incremental harvest against the manifest, or to recover knowledge stranded in transcripts, unmerged branches, or runtime memories.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Conversation Harvest?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/99ways-io-conversation-harvest)
---
name: conversation-harvest
description: Harvest durable knowledge from past Claude Code and Codex conversations in batch. Use when asked to document what many past sessions established (sessions that ended without checkpoint learning), to run a periodic incremental harvest against the manifest, or to recover knowledge stranded in transcripts, unmerged branches, or runtime memories.
---
# Conversation Harvest
[workflows.md](../../workflows.md) owns evidence, retention, and editing rules; [post-project-learning](../post-project-learning/SKILL.md) owns distillation; [knowledge-change-review](../knowledge-change-review/SKILL.md) reviews the edits. This skill adds what batch work needs: source coverage, replay collapse, cross-session outcomes, a decision ledger, and a manifest.
Work by subject and join evidence across sessions and Git, including what happened after a deliverable and whether a correction stuck. Discovery records candidates with locators; promotion requires a supported change to maintained understanding.
## Sources and their traps
Keep hosts, transcript stores, and retention settings in an agent-environment section of the active contributor's page (`context_path` from `python3 scripts/contributor.py whoami --json`); add the section on the first harvest. Default stores:
- **Claude Code:** `~/.claude/projects/<project>/<session>.jsonl`; `agent-*.jsonl` files are subagent runs. Cleanup settings prune old transcripts (`cleanupPeriodDays`, default 30 days): check them and snapshot before sessions age out.
- **Codex:** `~/.codex/sessions/YYYY/MM/DD/rollout-<local time>-<id>.jsonl[.zst]` and `~/.codex/archived_sessions/`; titles in `~/.codex/session_index.jsonl` and in the `threads` table of the SQLite state database under `~/.codex/`, whose `source` marks agent-run threads (`exec`, subagents). Records carry UTC.
Before trusting any count:
- Codex stores plain `.jsonl` and compressed `.jsonl.zst` rollouts; a database path can omit the compression suffix. Check both before declaring a history missing.
- Claude Desktop SSH sessions live on the remote host; the local `ssh-*` mirror is partial. Key Claude sessions by file name: a resumed session's records carry its parent's `sessionId`.
- Injected context (`<environment_context>`, `<in-app-browser-context …>`, `<system-reminder>`, worktree notices) can sit in front of the person's own words in the same text item. Strip the block and keep the rest; dropping the whole item silently loses human turns and the decisions in them.
- Codex records `forked_from_id`; some forks replay the parent's history, and resumed Claude sessions open with a summary. Collapse matching full events only within documented ancestry or copies of the same runtime/session. Independent repetitions remain separate evidence of use. A `USER` record can contain pasted or machine-originated material; it does not by itself establish human authorship or endorsement.
- Choose a cutoff and exclude everything after it: the harvest's own session, and any concurrent agent's sessions and memory updates.
- Runtime memories are leads from the same lineage as the transcripts, never corroboration.
## Procedure
1. **Snapshot.** Copy in-scope transcripts into a dated archive outside app storage, session scratchpads, and the repository, one folder per execution host and OS user (e.g. `laptop-ada`, `server-ada`, `server-ben`; an APFS clone `cp -c` on macOS, `rsync` from remote hosts; export the Codex `threads` rows as a JSON array of `id` and `title` to `threads.json` for titles) so `host` records the account owner directly. Leave out personal threads and agent-run threads (Codex `exec` and subagent threads, Claude `agent-*.jsonl`); record exclusions with their reason.
2. **Condense.** From the repository root, `python3 -I skills/conversation-harvest/scripts/harvest.py <archive> <out> --cutoff <utc> [--previous wiki/learning-system/conversation-harvest-manifest.tsv]` writes `<out>/manifest.tsv` and condensed sessions: full visible user turns (answers to the agent's questions included; Claude Code stores them as tool results) and final assistant messages, earlier assistant excerpts, edits, errors, PR links, interruptions, and locators `[L<line> <utc>]`. It supports Codex response and legacy/completed-item event formats and Claude messages; hidden reasoning is excluded. Malformed JSON or decompression fails the run; a missing `--previous` file runs as a first harvest. Keep `<out>` outside tracked paths (beside the archive or in a gitignored `tmp/`): condensed sessions carry raw conversation text. A continuation can contain a new outcome without a new user turn; review it with its inherited context. Spot-check both runtimes; `python3 -I skills/conversation-harvest/scripts/rawline.py <archive> <source> <line> [<end>]` opens a locator.
3. **Map sessions to subjects** (entity, domain, skill, the vault itself) from opening prompts, edited paths, and titles; titles alone mislead because threads drift. Batch by subject and period, starting at about 300–600k condensed characters per batch.
4. **Pilot.** Run one rich entity subject and the vault's own system (doctrine, skills, learning) first, read the cards, and calibrate the brief, batch size, and per-batch token and time budget. For a temporal evaluation, withhold later transcripts and use knowledge frozen before their cutoff. If current accounts or earlier reviews already expose those outcomes, label the exercise a retrospective coverage check. Rule coverage alone does not measure prevented mistakes; prevention needs an agent to execute without the later evidence.
5. **Extract** with one subagent per batch and [the extraction brief](references/extraction-brief.md): cards, not edits. When a usage cap stops parallel agents, resume each with a message; their progress is kept.
6. **Check open pull requests and other stranded work** before editing a subject: build on an open PR that rewrites the same files, or leave those files alone.
7. **Route and apply.** Route each card to the one applier that holds its target file set; appliers decide every card with [the apply brief](references/apply-brief.md) (apply, merge, reject, defer, reroute) and keep a ledger. The lead decides doctrine, system pages, and reroutes. Before review, reconcile the ledgers with the card set so every card id has exactly one verdict: an applier can leave a routed card unread, and an unrouted card stays undecided.
8. **Review and land.** Run knowledge-change-review on each area's diff, run `python3 scripts/validate_structure.py`, and commit per area on a branch with `python3 scripts/contributor.py author-args`, never mixing entities. Doctrine edits go in their own commit for the owner's explicit approval.
9. **Record and hand off.** Keep one row per session in `wiki/learning-system/conversation-harvest-manifest.tsv`. On the first harvest, create it with its tab-separated header:
```bash
printf 'key\ttool\thost\tcreated\tlast_event\tbytes\tsource_sha256\tcutoff\tparser_sha256\tuser_turns\tbatch\tverdict\n' > wiki/learning-system/conversation-harvest-manifest.tsv
```
Fill the first ten columns by name from the generated manifest, add `batch` and the processing `verdict` (read; skipped or excluded, with the reason; unreadable), and update a session's existing row in place. Omit titles, which carry entity and people names and pasted text. A rerun skips only matching source/parser hashes at the same cutoff; changed sessions, and rows without hashes, reopen in full so later outcomes retain their request context. Record results and coverage limits in the [learning-system account](../../wiki/learning-system/review.md). Report decision-relevant Time-sensitive and Security items with kind and locator, never a value.
## Judgment
- **The test.** A card changes what a capable agent would do or infer; it is not cheaply and reliably recoverable from the wiki, code, or a live system; its scope, date, and evidence level can be stated. When agents miss existing guidance, repair its retrieval or the controlling trigger at the affected step. Repeating common competence adds no knowledge.
- **Outcomes are separate facts.** Delivered, adopted, validated, reversed; the agent's own report and silence establish none.
- **Minimum evidence.** A fact or decision needs the speaker's words (attributed to the contributor via `scripts/contributors.json`) or an observation. A correction needs the speaker's words and the error's origin, and patches that origin. A new procedure needs an explicit request or reuse on another occasion, plus the reason it worked.
- **Where it lands.** Ask where the mechanism lives: a platform, tool, or method shared across entities goes to its domain playbook (`wiki/<domain>/`) once its cause and version boundary are known; an entity's business stays in its account (`wiki/<entity>/`) until evidence shows it transfers. A person's cross-project preferences need a broad statement or two contexts.
- **Stranded work is a finding.** Knowledge on unmerged branches, in other checkouts, in uncommitted worktrees, or in runtime memories is recovered from the transcripts and placed in its subject.