Problem
When switching from a third-party LLM endpoint (e.g. mimo) to AWS Bedrock mid-session, Claude Code carries over conversation history containing `thinking` blocks with an empty `signature` field. Bedrock strictly validates `signature`, so any subsequent request fails with:
```
API Error: 400 messages.1.content.0: Invalid `signature` in `thinking` block
```
Goal
Clone an existing Claude session JSONL with all `thinking` blocks stripped, so the clone can be resumed under a strict endpoint. Source session is never modified.
Proposed UX
CLI:
```
aps clone --strip-thinking
```
Prints new session ID and cd "<cwd>" && claude --resume <new-id>.
Interactive: T on a selected session → confirm prompt → clone+strip → show new ID in status bar. Stay in picker, no auto-launch.
Clone Logic (based on CC /branch source)
- Read source JSONL; skip
isSidechain: true entries and non-transcript entries
- Assign new UUID as
sessionId; rebuild parentUuid chain
- Keep all other fields intact (
uuid, timestamps, cwd, gitBranch, etc.)
- Add
forkedFrom: {sessionId, messageUuid} for traceability
- With
--strip-thinking: filter out {"type":"thinking",...} blocks from every assistant content array
- Copy
content-replacement entries (rewrite their sessionId to the new UUID)
- Write to same project dir as
<new-uuid>.jsonl
Plan
docs/agent/plan-issue-47-clone-strip-thinking.md
Acceptance Criteria
- Source session never modified
- New session ID + resume command printed to stdout
- Works from CLI subcommand and interactive picker keybinding (
T)
- Session ID argument supports full UUID and unambiguous prefix
Problem
When switching from a third-party LLM endpoint (e.g. mimo) to AWS Bedrock mid-session, Claude Code carries over conversation history containing `thinking` blocks with an empty `signature` field. Bedrock strictly validates `signature`, so any subsequent request fails with:
```
API Error: 400 messages.1.content.0: Invalid `signature` in `thinking` block
```
Goal
Clone an existing Claude session JSONL with all `thinking` blocks stripped, so the clone can be resumed under a strict endpoint. Source session is never modified.
Proposed UX
CLI:
```
aps clone --strip-thinking
```
Prints new session ID and
cd "<cwd>" && claude --resume <new-id>.Interactive:
Ton a selected session → confirm prompt → clone+strip → show new ID in status bar. Stay in picker, no auto-launch.Clone Logic (based on CC
/branchsource)isSidechain: trueentries and non-transcript entriessessionId; rebuildparentUuidchainuuid, timestamps,cwd,gitBranch, etc.)forkedFrom: {sessionId, messageUuid}for traceability--strip-thinking: filter out{"type":"thinking",...}blocks from every assistantcontentarraycontent-replacemententries (rewrite theirsessionIdto the new UUID)<new-uuid>.jsonlPlan
docs/agent/plan-issue-47-clone-strip-thinking.mdAcceptance Criteria
T)