# feat\(mcp\): merge back conversation context · PR \#8697 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/8697)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: closed

Source repository: pingdotgg/t3code

Source branch: agents/mcp-conversations/merge-back

Target branch: agents/mcp-conversations/fork

Head commit: afe96811882382ce92e911edbe21b6251a1ffee3

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/8697)

[Commits](https://git.cafe/pingdotgg/t3code/pull/8697/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/8697/diffs?format=markdown)

## Description

---

## Problem

A durable conversation fork could produce a result, but agents had no safe way to return that conversation context to the fork's original parent.

## Change

Add `t3_thread_merge_back` on top of the fork transfer service, backed by the existing `thread.merge_back` V2 command through `ThreadManagementService`.

## Behavior

The tool validates original fork lineage, source and target permission ceilings, and an explicit provider-finished source before dispatch. It returns source, target, fork-base provenance, the committed receipt, superseded pending transfers, and truthful next-target-turn consumption. Stable retries replay the same accepted transfer before mutable lineage or lifecycle checks. It never performs a Git merge or changes workspace state.

## Focused validation

- transfer contract and production root-object schema tests
- non-fork, source/target ceiling, accepted-retry, and projection-failure coverage
- event-driven real MCP-to-V2/provider-adapter integration covering merge-back, retry, supersession, and managed-adapter consumption on the target's next turn
- 5 focused files / 16 tests passed across the complete native stack
- server and contracts scoped typechecks, targeted formatting, and `git diff --check`

## Dependency

Upper layer of native stack 8776. Depends on [#8696](https://github.com/pingdotgg/t3code/pull/8696) for the focused conversation transfer contract, service, fork creation, and bounded transfer read path.

Implemented by GPT-5.6-Sol via Codex in T3 Code.

