GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Draft: two-way teleport with native CLI sessions by baanish · Pull Request #7136 · pingdotgg/t3code

Draft: two-way teleport with native CLI sessions #7136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
baanish wants to merge 62 commits into pingdotgg:main from baanish:cursor/teleport-opencode-1e23

Uh oh!

There was an error while loading. Please reload this page.

Closed

Draft: two-way teleport with native CLI sessions #7136

Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
8acf756
feat(teleport): add the import/export engine without native formats
cursoragent Aug 15, 2026
75a3793
feat(teleport): add the import picker and export button
cursoragent Aug 15, 2026
1700d19
feat(teleport): add Codex native session support
cursoragent Aug 15, 2026
dbc8452
feat(teleport): add OpenCode native session support
cursoragent Aug 15, 2026
2048109
feat(teleport): add Claude native session support
cursoragent Aug 15, 2026
38eac2f
feat(teleport): add Grok native session support
cursoragent Aug 15, 2026
5062f81
fix(opencode): settle the session when a turn is aborted
cursoragent Aug 15, 2026
9de48da
fix(opencode): unstick Working when Stop has no live session
cursoragent Aug 15, 2026
3620294
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
6a51d21
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
f86f532
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
959ef15
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
d24730c
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
3ac60c2
test(teleport): use generic fixture paths
cursoragent Aug 15, 2026
9594bd8
test(teleport): use generic OpenCode fixture copy
cursoragent Aug 15, 2026
10503d6
merge(teleport): stack UI on sanitized backend
cursoragent Aug 15, 2026
5cca3e4
merge(teleport): stack Codex on UI
cursoragent Aug 15, 2026
daccf14
merge(teleport): stack Claude on Codex
cursoragent Aug 15, 2026
0c490e2
merge(teleport): stack Grok on Claude
cursoragent Aug 15, 2026
87fd928
merge(teleport): stack OpenCode on Grok
cursoragent Aug 15, 2026
18ed3c0
Merge branch 'main' into cursor/teleport-opencode-1e23
baanish Aug 15, 2026
b3ac6a8
fix(web): match teleport controls to existing header primitives
cursoragent Aug 16, 2026
468bc93
fix(teleport): close lock, path, and projection holes from review
cursoragent Aug 16, 2026
77fbd25
refactor(teleport): collocate TeleportService in one module
cursoragent Aug 16, 2026
9e479d0
fix(web): hide teleport when the server lacks the capability
cursoragent Aug 16, 2026
15193f8
fix(teleport): discover Codex and Claude sessions across instance homes
cursoragent Aug 16, 2026
d075c83
fix(teleport): keep busy threads and OpenCode paths from corrupting s…
cursoragent Aug 16, 2026
3b38975
fix(teleport): distinguish lock probes and write to instance homes
cursoragent Aug 16, 2026
95fba97
fix(teleport): keep custom instances on the selected native session
cursoragent Aug 16, 2026
d76928b
test(web): drop duplicated teleport capability cases
cursoragent Aug 16, 2026
1cb4f0f
fix(teleport): match existing threads by provider instance
cursoragent Aug 16, 2026
ef27858
fix(teleport): write OpenCode sqlite sessions the CLI can resume
cursoragent Aug 16, 2026
cb5633b
fix(teleport): keep export from splitting T3 and the native CLI
cursoragent Aug 16, 2026
a0c3154
fix(mobile): keep drafts when a thread is in the native CLI
cursoragent Aug 16, 2026
9e1d363
fix(web): show a disabled cursor while teleport is busy
cursoragent Aug 17, 2026
702df18
fix(teleport): keep discovery from mixing CLI homes and transcripts
cursoragent Aug 17, 2026
db4a2dc
fix(teleport): apply OpenCode cwd rules to explicit native paths
cursoragent Aug 17, 2026
4f7f53b
fix(teleport): drop Grok and OpenCode native session formats
cursoragent Aug 17, 2026
579dadc
fix(teleport): register native formats through an Effect service
cursoragent Aug 17, 2026
838953a
fix(teleport): probe native locks through ProcessRunner
cursoragent Aug 17, 2026
f700884
fix(opencode): wait for abort before accepting a new turn
cursoragent Aug 17, 2026
d75a839
fix(orchestration): prune only a thread's own attachments
cursoragent Aug 17, 2026
616a55e
fix(web): list physical projects for teleport import
cursoragent Aug 17, 2026
95c5b6e
fix(teleport): honor empty extra-instance home paths
cursoragent Aug 17, 2026
a5966af
fix(opencode): complete the abort gate with Effect 4 APIs
cursoragent Aug 17, 2026
26c6932
fix(opencode): emit one abort for concurrent Stop
cursoragent Aug 17, 2026
276620a
fix(teleport): import worktree threads back into their project
cursoragent Aug 17, 2026
f712cbd
fix(teleport): restore presence when export fails after pending
cursoragent Aug 17, 2026
84ea40b
fix(teleport): keep export cleanup from failing the original error
cursoragent Aug 17, 2026
5c6d9e1
fix(teleport): derive error messages and delete failed imports
cursoragent Aug 17, 2026
1fe0b03
fix(teleport): derive write errors from stage
cursoragent Aug 17, 2026
b65ca1a
fix(teleport): bind in-place imports before replacing history
cursoragent Aug 17, 2026
5328a96
Merge pingdotgg/t3code main into teleport tip.
cursoragent Aug 18, 2026
6c15543
fix(web): theme TeleportOutButton like other header controls
cursoragent Aug 19, 2026
f1ace6f
fix(web): keep teleported-out composer drafts unmutated
cursoragent Aug 19, 2026
710bd1c
Merge branch 'main' into cursor/teleport-opencode-1e23
baanish Aug 19, 2026
af47f2c
fix(teleport): commit in-place import as one T3 state transition
cursoragent Aug 19, 2026
49935d1
Merge branch 'main' into cursor/teleport-opencode-1e23
baanish Aug 19, 2026
aa2fad3
fix(teleport): revert importing fence on interrupt and defects
cursoragent Aug 19, 2026
535e79a
Merge branch 'main' into cursor/teleport-opencode-1e23
cursoragent Aug 19, 2026
6868b38
Merge branch 'main' into cursor/teleport-opencode-1e23
cursoragent Aug 20, 2026
40508c9
fix(web): keep locked composer drafts unmutated after async work
cursoragent Aug 20, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

3 changes: 3 additions & 0 deletions 3 apps/server/src/auth/RpcAuthorization.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ export const RPC_REQUIRED_SCOPES = {
[WS_METHODS.subscribeServerLifecycle]: AuthOrchestrationReadScope,
[WS_METHODS.subscribeAuthAccess]: AuthAccessReadScope,
[WS_METHODS.subscribeBackgroundPolicy]: AuthOrchestrationReadScope,
[WS_METHODS.teleportListSessions]: AuthOrchestrationReadScope,
[WS_METHODS.teleportImportSessions]: AuthOrchestrationOperateScope,
[WS_METHODS.teleportExportSession]: AuthOrchestrationOperateScope,
} as const satisfies Readonly<Record<WsRpcMethod, AuthEnvironmentScope>>;

export function requiredScopeForRpcMethod(method: string): AuthEnvironmentScope {
Expand Down
90 changes: 90 additions & 0 deletions 90 apps/server/src/orchestration/Layers/ProjectionPipeline.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
pendingUserInputCount: 0,
hasActionableProposedPlan: 0,
deletedAt: null,
teleport: null,
});
return;

Expand Down Expand Up @@ -850,6 +851,21 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
return;
}

case "thread.teleported": {
const existingRow = yield* projectionThreadRepository.getById({
threadId: event.payload.threadId,
});
if (Option.isNone(existingRow)) {
return;
}
yield* projectionThreadRepository.upsert({
...existingRow.value,
teleport: event.payload.teleport,
updatedAt: event.payload.updatedAt,
});
return;
}

case "thread.message-sent":
case "thread.proposed-plan-upserted":
case "thread.activity-appended":
Expand All @@ -869,6 +885,22 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
return;
}

case "thread.history-replaced": {
const existingRow = yield* projectionThreadRepository.getById({
threadId: event.payload.threadId,
});
if (Option.isNone(existingRow)) {
return;
}
yield* projectionThreadRepository.upsert({
...existingRow.value,
latestTurnId: null,
updatedAt: event.occurredAt,
});
yield* refreshThreadShellSummary(event.payload.threadId);
return;
}

case "thread.session-set": {
const existingRow = yield* projectionThreadRepository.getById({
threadId: event.payload.threadId,
Expand Down Expand Up @@ -1019,6 +1051,31 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
return;
}

case "thread.history-replaced": {
yield* projectionThreadMessageRepository.deleteByThreadId({
threadId: event.payload.threadId,
});
yield* Effect.forEach(
event.payload.messages,
(message) =>
projectionThreadMessageRepository.upsert({
messageId: message.id,
threadId: event.payload.threadId,
turnId: message.turnId,
role: message.role,
text: message.text,
...(message.attachments !== undefined
? { attachments: [...message.attachments] }
: {}),
isStreaming: message.streaming,
createdAt: message.createdAt,
updatedAt: message.updatedAt,
}),
{ concurrency: 1 },
).pipe(Effect.asVoid);
return;
}

default:
return;
}
Expand All @@ -1041,6 +1098,12 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
});
return;

case "thread.history-replaced":
yield* projectionThreadProposedPlanRepository.deleteByThreadId({
threadId: event.payload.threadId,
});
return;

case "thread.reverted": {
const existingRows = yield* projectionThreadProposedPlanRepository.listByThreadId({
threadId: event.payload.threadId,
Expand Down Expand Up @@ -1095,6 +1158,12 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
});
return;

case "thread.history-replaced":
yield* projectionThreadActivityRepository.deleteByThreadId({
threadId: event.payload.threadId,
});
return;

case "thread.reverted": {
const existingRows = yield* projectionThreadActivityRepository.listByThreadId({
threadId: event.payload.threadId,
Expand Down Expand Up @@ -1448,6 +1517,12 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
return;
}

case "thread.history-replaced":
yield* projectionTurnRepository.deleteByThreadId({
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

threadId: event.payload.threadId,
});
return;

case "thread.reverted": {
const existingTurns = yield* projectionTurnRepository.listByThreadId({
threadId: event.payload.threadId,
Expand Down Expand Up @@ -1601,6 +1676,21 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti
return;
}

case "thread.history-replaced": {
const pendingRows = yield* projectionPendingApprovalRepository.listByThreadId({
threadId: event.payload.threadId,
});
yield* Effect.forEach(
pendingRows,
(row) =>
projectionPendingApprovalRepository.deleteByRequestId({
requestId: row.requestId,
}),
{ concurrency: 1 },
).pipe(Effect.asVoid);
return;
}

default:
return;
}
Expand Down
67 changes: 67 additions & 0 deletions 67 apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2459,4 +2459,71 @@ projectionSnapshotLayer("ProjectionSnapshotQuery windowed thread detail", (it) =
}
}),
);

it.effect("hydrates teleport presence onto thread detail and shell snapshots", () =>
Effect.gen(function* () {
const snapshotQuery = yield* ProjectionSnapshotQuery;
const sql = yield* SqlClient.SqlClient;

yield* sql`DELETE FROM projection_projects`;
yield* sql`DELETE FROM projection_threads`;
yield* sql`DELETE FROM projection_state`;

yield* sql`
INSERT INTO projection_projects (
project_id, title, workspace_root, scripts_json, created_at, updated_at, deleted_at
)
VALUES (
'project-teleport', 'Teleport', '/tmp/project-teleport', '[]',
'2026-08-14T00:00:00.000Z', '2026-08-14T00:00:00.000Z', NULL
)
`;
yield* sql`
INSERT INTO projection_threads (
thread_id, project_id, title, model_selection_json, runtime_mode, interaction_mode,
pending_approval_count, pending_user_input_count, has_actionable_proposed_plan,
created_at, updated_at, deleted_at, teleport_json
)
VALUES (
'thread-teleport', 'project-teleport', 'Native thread',
'{"provider":"grok","model":"grok-4"}', 'full-access', 'default',
0, 0, 0, '2026-08-14T00:00:00.000Z', '2026-08-14T00:00:00.000Z', NULL,
'{"presence":"native","provider":"grok","externalSessionId":"session-1","nativePath":"/tmp/native","lastSyncedAt":"2026-08-14T00:00:01.000Z"}'
)
`;
for (const projector of Object.values(ORCHESTRATION_PROJECTOR_NAMES)) {
yield* sql`
INSERT INTO projection_state (projector, last_applied_sequence, updated_at)
VALUES (${projector}, 1, '2026-08-14T00:00:01.000Z')
`;
}

const expectedTeleport = {
presence: "native",
provider: "grok",
externalSessionId: "session-1",
nativePath: "/tmp/native",
lastSyncedAt: "2026-08-14T00:00:01.000Z",
};
const detail = yield* snapshotQuery.getThreadDetailById(ThreadId.make("thread-teleport"));
assert.equal(detail._tag, "Some");
if (detail._tag === "Some") {
assert.deepEqual(detail.value.teleport, expectedTeleport);
}
const shell = yield* snapshotQuery.getThreadShellById(ThreadId.make("thread-teleport"));
assert.equal(shell._tag, "Some");
if (shell._tag === "Some") {
assert.deepEqual(shell.value.teleport, expectedTeleport);
}

yield* sql`
UPDATE projection_threads
SET archived_at = '2026-08-14T00:00:02.000Z'
WHERE thread_id = 'thread-teleport'
`;
const archived = yield* snapshotQuery.getArchivedShellSnapshot();
assert.equal(archived.threads[0]?.id, ThreadId.make("thread-teleport"));
assert.deepEqual(archived.threads[0]?.teleport, expectedTeleport);
}),
);
});
26 changes: 21 additions & 5 deletions 26 apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
type OrchestrationThreadShell,
ModelSelection,
ProjectId,
TeleportThreadState,
ThreadId,
} from "@t3tools/contracts";
import * as Arr from "effect/Array";
Expand Down Expand Up @@ -89,6 +90,9 @@ const ProjectionThreadProposedPlanDbRowSchema = ProjectionThreadProposedPlan;
const ProjectionThreadDbRowSchema = ProjectionThread.mapFields(
Struct.assign({
modelSelection: Schema.fromJsonString(ModelSelection),
teleport: Schema.NullOr(Schema.fromJsonString(TeleportThreadState)).pipe(
Schema.withDecodingDefault(Effect.succeed(null)),
),
}),
);
const ProjectionThreadActivityDbRowSchema = ProjectionThreadActivity.mapFields(
Expand Down Expand Up @@ -438,7 +442,8 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
pending_approval_count AS "pendingApprovalCount",
pending_user_input_count AS "pendingUserInputCount",
has_actionable_proposed_plan AS "hasActionableProposedPlan",
deleted_at AS "deletedAt"
deleted_at AS "deletedAt",
teleport_json AS "teleport"
FROM projection_threads
ORDER BY created_at ASC, thread_id ASC
`,
Expand Down Expand Up @@ -474,7 +479,8 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
pending_approval_count AS "pendingApprovalCount",
pending_user_input_count AS "pendingUserInputCount",
has_actionable_proposed_plan AS "hasActionableProposedPlan",
deleted_at AS "deletedAt"
deleted_at AS "deletedAt",
teleport_json AS "teleport"
FROM projection_threads
WHERE deleted_at IS NULL
AND archived_at IS NULL
Expand Down Expand Up @@ -512,7 +518,8 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
pending_approval_count AS "pendingApprovalCount",
pending_user_input_count AS "pendingUserInputCount",
has_actionable_proposed_plan AS "hasActionableProposedPlan",
deleted_at AS "deletedAt"
deleted_at AS "deletedAt",
teleport_json AS "teleport"
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

FROM projection_threads
WHERE deleted_at IS NULL
AND archived_at IS NOT NULL
Expand Down Expand Up @@ -954,7 +961,8 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
pending_approval_count AS "pendingApprovalCount",
pending_user_input_count AS "pendingUserInputCount",
has_actionable_proposed_plan AS "hasActionableProposedPlan",
deleted_at AS "deletedAt"
deleted_at AS "deletedAt",
teleport_json AS "teleport"
FROM projection_threads
WHERE thread_id = ${threadId}
AND deleted_at IS NULL
Expand Down Expand Up @@ -1150,7 +1158,9 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
'thread.activity-appended',
'thread.turn-diff-completed',
'thread.reverted',
'thread.session-set'
'thread.session-set',
'thread.history-replaced',
'thread.teleported'
)
`,
});
Expand Down Expand Up @@ -1711,6 +1721,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
activities: activitiesByThread.get(row.threadId) ?? [],
checkpoints: checkpointsByThread.get(row.threadId) ?? [],
session: sessionsByThread.get(row.threadId) ?? null,
...(row.teleport == null ? {} : { teleport: row.teleport }),
}));

const snapshot = {
Expand Down Expand Up @@ -1918,6 +1929,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
activities: [],
checkpoints: [],
session: sessionByThread.get(row.threadId) ?? null,
...(row.teleport == null ? {} : { teleport: row.teleport }),
});
}

Expand Down Expand Up @@ -2057,6 +2069,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
row.threadId,
),
planProgress: threadPlanProgress.getThreadPlanProgress(row.threadId),
...(row.teleport == null ? {} : { teleport: row.teleport }),
} satisfies OrchestrationThreadShell)
: Result.failVoid,
),
Expand Down Expand Up @@ -2202,6 +2215,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
row.threadId,
),
planProgress: threadPlanProgress.getThreadPlanProgress(row.threadId),
...(row.teleport == null ? {} : { teleport: row.teleport }),
}),
),
updatedAt: updatedAt ?? "1970-01-01T00:00:00.000Z",
Expand Down Expand Up @@ -2481,6 +2495,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
threadRow.value.threadId,
),
planProgress: threadPlanProgress.getThreadPlanProgress(threadRow.value.threadId),
...(threadRow.value.teleport == null ? {} : { teleport: threadRow.value.teleport }),
} satisfies OrchestrationThreadShell);
});

Expand Down Expand Up @@ -2655,6 +2670,7 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
completedAt: row.completedAt,
})),
session: Option.isSome(sessionRow) ? mapSessionRow(sessionRow.value) : null,
...(threadRow.value.teleport == null ? {} : { teleport: threadRow.value.teleport }),
};

return Option.some(
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.