The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 12:15 UTC
fix(pi): Pi agents get T3CODE_THREAD_ID like Claude, Codex and ACP sessions (#31870)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
spoukyii committed
Nov 14, 2026 at 20:16 UTC
b39fc24ff20203a52dd29e36206477975adcf8b1
2 files changed
+3
-1
packages/provider-pi/src/server/adapter.test.ts
+1
@@ -2115,6 +2115,7 @@ describe("PiAdapterV2", () => {
2115
assert.equal(spawn.env.T3_MCP_URL, "http://127.0.0.1:43123/mcp");
2116
assert.equal(spawn.env.T3_MCP_BEARER_TOKEN, "secret-pi-token");
2117
assert.equal(spawn.env.T3_PI_RUNTIME_MODE, "full-access");
2118
+ assert.equal(spawn.env.T3CODE_THREAD_ID, THREAD_ID);
2119
}).pipe(Effect.scoped, Effect.provide(layerTest)),
2120
);
2121
packages/provider-pi/src/server/adapter.ts
+2
-1
@@ -517,7 +517,8 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* (
517
return yield* Effect.gen(function* () {
518
const launch = buildPiRpcLaunch({
519
launchArgs: resolvedLaunchArgs.args,
520
- environment: options.environment,
520
+ // PortScanner.AGENT_THREAD_ENV, as a literal because this package cannot reach apps/server.
521
+ environment: { ...options.environment, T3CODE_THREAD_ID: input.threadId },
522
mcpSession,
523
extensionPath,
524
sessionPath,