Skip to content

feat(agent): replay imported Claude Code CLI transcripts#2876

Merged
adboio merged 1 commit into
mainfrom
posthog-code/import-cc-1-agent-replay
Jun 26, 2026
Merged

feat(agent): replay imported Claude Code CLI transcripts#2876
adboio merged 1 commit into
mainfrom
posthog-code/import-cc-1-agent-replay

Conversation

@adboio

@adboio adboio commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

want to allow users to import claude code sessions, mostly for activation reasons

Changes

1/n - updates adapter to allow "replay" of a cli session transcript

no user-facing or user-reachable changes here for now

How did you test this?

manually (upstack)

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

adboio commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 153d55c.

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(agent): replay imported Claude Code..." | Re-trigger Greptile

Comment thread packages/agent/src/adapters/claude/conversion/sdk-to-acp.test.ts Outdated
Comment thread packages/agent/src/adapters/claude/conversion/sdk-to-acp.ts Outdated
Teach the Claude adapter to replay an imported CLI transcript into a
fresh session: emit user prompts and top-level assistant text/thinking
(no client history to dedupe against), recover typed slash-command
invocations, and mark replayed user chunks so the load path can promote
them into user bubbles. Also extracts encodeCwdToProjectKey from the
JSONL path helper and adds the shared IMPORTED_USER_PROMPT_META_KEY
marker plus the importedClaudeSession task-creation field.

Part 1/3 of splitting #2873 (import Claude Code sessions).

Generated-By: PostHog Code
Task-Id: 6c93b6e8-27b6-45c8-8135-73a09076ea93
@adboio adboio force-pushed the posthog-code/import-cc-1-agent-replay branch from 442269e to 153d55c Compare June 24, 2026 15:20
@adboio adboio requested a review from a team June 24, 2026 15:30
@adboio adboio marked this pull request as ready for review June 24, 2026 15:30
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "feat(agent): replay imported Claude Code..." | Re-trigger Greptile

@adboio adboio mentioned this pull request Jun 25, 2026
2 tasks

adboio commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jun 26, 2:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 26, 2:31 PM UTC: @adboio merged this pull request with Graphite.

@adboio adboio merged commit b1e0230 into main Jun 26, 2026
28 checks passed
@adboio adboio deleted the posthog-code/import-cc-1-agent-replay branch June 26, 2026 14:31
adboio added a commit that referenced this pull request Jun 26, 2026
## Problem

#2876 enables replaying cli sessions; need a way to discover + import them

<!-- Who is this for and what problem does it solve? -->

<!-- Closes #ISSUE_ID -->

## Changes

enables claude code cli session discovery + import

still not user-accessible, UX will come in the next PR up

<!-- What did you change and why? -->

<!-- If there are frontend changes, include screenshots. -->

## How did you test this?

manually (upstack)

<!-- Describe what you tested -- manual steps, automated tests, or both. -->

<!-- If you're an agent, only list tests you actually ran. -->

## Automatic notifications

- [ ] Publish to changelog?
- [ ] Alert Sales and Marketing teams?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants