Chat History

Every Claude Code session, in one place.

Import every chat you've had with Claude Code or Codex into TeamX. Search across titles and bodies, filter by repo or member, see exactly which files an agent touched, share a session with a teammate by URL. One command. Privacy-first by default.

How it works

Your jsonl transcripts, parsed and indexed.

Claude Code stores every session as a .jsonl file in ~/.claude/projects/. Codex does the same under ~/.codex/sessions/. The CLI walks these, parses every turn, strips tool inputs (by default), and posts each conversation to your TeamX team.

Idempotent uploads

Each conversation upserts by (member_id, session_id). Re-syncing the same file just replaces its messages. Safe to run on a cron.

Privacy-first by default

Tool call inputs (file contents, shell commands, edit diffs) are stripped. Only tool NAMES + message text are uploaded. Pass --include-code if you want the full payload.

Incremental sync

Tracks each file’s mtime in .teamx-sync-history.json. Second run skips anything untouched since last sync. Typical re-sync of 100+ sessions takes under 2 seconds.

Setup

One command. Every session.

1

Connect your agent first

Chat History rides on the same connection as the watcher. If you haven't connected yet, follow the Connect Agent guide.

2

Run sync-history once

The CLI walks ~/.claude/projects and ~/.codex/sessions, parses every .jsonl transcript, and uploads each conversation to TeamX. First run does everything; subsequent runs only upload files that changed.

npx @teamx-sh/agent sync-history
3

Browse in Dashboard → Chat History

Filter by member, agent type, repo, or search across titles and content. Click a conversation to see the full thread — user prompts, assistant replies, tool calls, and which files were touched.

4

Re-sync whenever you want

Run the same command. State lives in .teamx-sync-history.json so only new or modified sessions upload. Pass --force to re-upload everything from scratch.

npx @teamx-sh/agent sync-history           # incremental
npx @teamx-sh/agent sync-history --force   # full resync
Flags

Knobs when you need them.

--include-code

Include raw tool-use inputs (file contents, shell commands). Off by default.

--since=2025-01-01

Only sync sessions that started on or after this date.

--force

Ignore the incremental state file and re-upload everything.

CLAUDE_HOME / CODEX_HOME

Env vars to override where the scanner looks for transcripts.

FAQ

Honest answers.

What exactly gets uploaded by default?â–¾

Message role (user/assistant/system/tool), text content, tool names (not their inputs), timestamps, token counts, repo path, and a title derived from your first prompt. File contents from Edit/Write tool calls, shell commands from Codex function calls, and any other tool payloads are stripped.

What does --include-code turn on?â–¾

The full tool_use inputs (file contents from Claude Code edits, shell command strings from Codex). Use this if you want a complete auditable transcript. Your code has to be OK to live in your TeamX database.

Where does the CLI read from?â–¾

Claude Code: ~/.claude/projects/<encoded-cwd>/*.jsonl. Codex: ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. Override either with CLAUDE_HOME / CODEX_HOME env vars if your tools live elsewhere.

Can I filter what gets uploaded?â–¾

Pass --since=2025-01-01 to skip old sessions. For more surgical filtering, delete entries from .teamx-sync-history.json (or temporarily rename the jsonl files you don’t want synced before running).

Does this push other people’s sessions?â–¾

No. sync-history only reads your own home directory and uploads under your TeamX member id. It authenticates with the token from your .teamx-config.json.

What about sensitive info in prompts?â–¾

If your prompt contains secrets or client data, that’s in the transcript. TeamX doesn’t redact prompt text — treat your uploaded history like a private knowledge base, same as you would a private GitHub repo.

One command. Every session ever.

Connect your agent, then run npx @teamx-sh/agent sync-history. Your team's AI work history, searchable forever.