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 — fix(server): a successful settle script's terminal no longer stays open in the worktree by smirea · Pull Request #44351 · pingdotgg/t3code

Conversation

@smirea

@smirea smirea commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Note

Claude Opus 5.5 writing on behalf of Stefan.

Problem

When a thread settles, T3 opens a new terminal in its worktree to run the project's runOnSettle action. When the action exits 0, the runner waits up to 1 s for the prompt and then calls closeIdle once. If the shell's prompt hook is still running at that moment, closeIdle keeps the shell open. That covers a git prompt (oh-my-zsh, starship), PROMPT_COMMAND, or a loaded machine that slows any of them past 1 s. closeIdle also keeps it open when the prompt redraws during the check, or when the ps query misses its 1 s budget. Nothing retries: closeOnSettle ran before this terminal was opened, and the thread is already settled.

The idle shell then stays at a prompt in the worktree until the server restarts, which blocks any cleanup that checks whether a process is using the directory. On one Mac, four settle shells were still alive 23 hours later, sitting in their worktrees, which the shells kept from being cleaned up. Each one's log ends with __T3_SETUP_DONE___<token>:0 followed by a fresh prompt.

docs/user/t3-json.md says of runOnSettle: "Terminal closes on success, stays open on failure." #16290 fixed the same symptom for a bash prompt redraw by waiting at most 1 s for the prompt. A prompt that takes longer than that brings the symptom back.

Change

When a settle action exits 0, the runner now closes its terminal with close instead of closeIdle. The settle terminal is T3's own: its id is new for each run, it opens after the thread settled, and by the time the sentinel prints, the action's subshell has exited. Unless someone typed a command into it, the only things the idle check can still find are the prompt hook or the prompt redraw. A failed settle action still keeps its shell open, and the terminal history keeps the output.

Scope

Fixes #44350

  • Only settle actions change. A successful setup (runOnWorktreeCreate) action still uses closeIdle. Its thread is active and the user may be using that terminal, and if the shell does stay open, closeOnSettle closes it when the thread settles.
  • Not in this change: closeOnSettle's own closeIdle sweep of the thread's other terminals has the same one-shot check.
  • The fix is server-only and changes no wire contract, so web, desktop and mobile all get it. Manual settle, auto-settle and drag-to-settle all go through ThreadSettlementService, so they all get it too.

Verification

Runs on a Linux VM with no account:

  • apps/server/src/project/ProjectSetupScriptRunner.test.ts: the new case "closes a successful settle shell even while its prompt is still busy" runs a settle action to exit 0. No prompt follows the sentinel, the 1 s prompt wait runs out, and closeIdle keeps the shell, as it does when a prompt hook is still running. It fails on main (expected [] to deeply equal ['settle-setup-…']) and passes here.
  • Scenario (source below), run with a 2 s bash prompt hook: SHELL=/bin/bash PROMPT_COMMAND='sleep 2' T3_SCENARIO_INHERIT_ENV='SHELL,PROMPT_COMMAND' vp run scenarios:prove scripts/scenarios/settle-script-shell-exits-after-success.e2e.ts --base origin/main. It adds a project with a runOnSettle action that writes its shell's PID (echo $$) and starts a worktree thread. It then settles the thread from the thread menu and waits 15 s for that PID to exit.
Base 337bb36869 Head ae3ca00eda (same change, before rebase)
Settle shell after 15 s ❌ still alive (expected true to be false) ✅ exited
  • Control: the same scenario without the slow prompt passes on both base and head, because a fast prompt was already closed by closeIdle.
  • vp run check:changed: the format, lint, knip and typecheck steps pass. One existing test, "reports a nonzero completion for a syntax error", fails on macOS on main as well (/bin/sh exits 1 there, not 2). This change doesn't touch it.
Scenario source (not committed)
import { expect } from "e2e";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Schema from "effect/Schema";
import * as HttpApiClient from "effect/http-api/HttpApiClient";
import { FetchHttpClient } from "effect/http";
import * as Crypto from "node:crypto";
import * as Fs from "node:fs";
import * as Path from "node:path";
import { CommandId, EnvironmentHttpApi, ProjectId } from "@t3tools/contracts";

import { APP_DIR, T3_HOME } from "../e2e.config.ts";
import { run } from "./shell.ts";
import { makeState, runPromise, test, WEB } from "./t3.ts";

const decodeLaunched = Schema.decodeUnknownEffect(
  Schema.fromJsonString(Schema.Struct({ threadId: Schema.String })),
);
const decodeRuntime = Schema.decodeUnknownEffect(
  Schema.fromJsonString(Schema.Struct({ origin: Schema.String })),
);

const alive = (pid: number) => {
  try {
    process.kill(pid, 0);
    return true;
  } catch {
    return false;
  }
};

test(
  "A successful settle script's terminal shell exits once the script finishes",
  WEB,
  async ({ t3, app, screen }) => {
    const { cli } = makeState(T3_HOME);
    const workspaces = Path.join(T3_HOME, "workspaces");
    const workspace = Path.join(workspaces, `settle-${Crypto.randomUUID().slice(0, 8)}`, "demo");
    const pidFile = Path.join(Path.dirname(workspace), "settle-shell.pid");
    const projectId = ProjectId.make(Crypto.randomUUID());

    const api = await runPromise(
      Effect.gen(function* () {
        const fs = yield* FileSystem.FileSystem;
        yield* fs.makeDirectory(workspace, { recursive: true });
        yield* fs.writeFileString(Path.join(workspace, "README.md"), "");
        const git = (args: ReadonlyArray<string>) => run("git", args, { cwd: workspace });
        yield* git(["init", "--quiet", "--initial-branch=main"]);
        yield* git(["add", "--all"]);
        yield* git([
          "-c",
          "user.name=Scenario",
          "-c",
          "[email protected]",
          "commit",
          "--quiet",
          "--message",
          "Initial commit",
        ]);
        const { origin } = yield* decodeRuntime(
          yield* fs.readFileString(Path.join(T3_HOME, "userdata", "server-runtime.json")),
        );
        const token = (yield* cli(["auth", "session", "issue", "--token-only"])).stdout.trim();
        const client = yield* HttpApiClient.make(EnvironmentHttpApi, { baseUrl: origin });
        const headers = { authorization: `Bearer ${token}` };
        yield* client.projects.mutate({
          headers,
          payload: {
            type: "project.create",
            commandId: CommandId.make(Crypto.randomUUID()),
            projectId,
            title: "demo",
            workspaceRoot: workspace,
            scripts: [
              {
                id: "cleanup",
                name: "Cleanup",
                // `$$` is the terminal's shell even inside T3's subshell wrapper.
                command: `echo $$ > '${pidFile}'`,
                icon: "play",
                runOnWorktreeCreate: false,
                runOnSettle: true,
              },
            ],
          },
        });
        return { client, headers };
      }).pipe(Effect.provide(FetchHttpClient.layer)),
    );

    try {
      const started = await runPromise(
        run(
          process.execPath,
          [
            "apps/server/src/bin.ts",
            "thread",
            "start",
            workspace,
            "hello",
            "--title",
            "Settle me",
            "--worktree",
            "main",
            "--provider",
            "devReplay",
            "--model",
            "showcase",
            "--wait",
            "--json",
            "--base-dir",
            T3_HOME,
          ],
          { cwd: APP_DIR, env: { PATH: process.env.PATH, HOME: process.env.HOME } },
        ).pipe(Effect.flatMap(({ stdout }) => decodeLaunched(stdout))),
      );

      await t3.open(started);
      await screen.getByRole("button", "Thread actions for Settle me").tap();
      await screen.getByRole("menuitem", "Settle thread", { exact: true }).tap();
      await app.screenshot("settled");

      const readPid = () => {
        try {
          return Fs.readFileSync(pidFile, "utf8").trim();
        } catch {
          return "";
        }
      };
      await expect.poll(readPid).not.toBe("");
      const shellPid = Number(readPid());
      // The script exited 0, so its terminal has nothing left to show or do.
      await expect.poll(() => alive(shellPid), { timeout: 15_000 }).toBe(false);
    } finally {
      await runPromise(
        Effect.gen(function* () {
          yield* api.client.projects.mutate({
            headers: api.headers,
            payload: {
              type: "project.delete",
              commandId: CommandId.make(Crypto.randomUUID()),
              projectId,
              force: true,
            },
          });
        }).pipe(Effect.ignore),
      );
    }
  },
);

Claude Opus 5.5 in Claude Code, running in T3 Code.

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@smirea @claude
fix(server): a successful settle script's terminal no longer stays op…
ce64ff2
…en in the worktree

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@smirea smirea mentioned this pull request Nov 27, 2026
fix(server): a successful settle script's terminal no longer stays open in the worktree smirea/t3code#12
Closed
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T17:56:07.085769Z ce64ff2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 4bc38b1
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d53b00e-dcf5-4ebe-854f-ec6492568915
Commits

Reviewing files that changed from the base of the PR and between ce64ff2 and 698e506.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The runner now fully closes terminals after successful settle-triggered scripts. Successful setup-triggered scripts retain idle-close behavior. The test harness supports both triggers and verifies terminal closure when a successful settle run completes while its prompt remains busy.

Changes: Settle Terminal Closure

Layer / File(s) Summary
Settle close policy and regression test
apps/server/src/project/ProjectSetupScriptRunner.ts, apps/server/src/project/ProjectSetupScriptRunner.test.ts
Successful settle runs close their terminal; close failures are logged and swallowed. Successful setup runs still use closeIdle, and unsuccessful runs leave the terminal open. The test harness supports both triggers and verifies terminal closure after a successful settle run with a busy prompt.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: voltcrash, sync

Merge Risk: Minimal · previous review ce64f

Successful settle scripts now close their terminal directly instead of relying on the idle check, so slow-prompt shells should no longer linger in a settled worktree. Failed scripts and setup-triggered scripts behave as before. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a successful settle script's terminal is now closed rather than left open in the worktree. It follows the conventional commit form and matches the raw summary, the obj…
Description check Passed The description covers the problem, the change, scope, and verification. It follows the template sections (Problem, Change, Scope, Verification) and gives a clear root cause, the reason the fix is lim…
Linked Issues check Passed Issue #44350 requires that a successful settle action's terminal closes, even when the shell prompt is slow. The diff in apps/server/src/project/ProjectSetupScriptRunner.ts (merge base f3e3633 to hea…
Out of Scope Changes check Passed The reviewed change is limited to the settle exit-0 path in ProjectSetupScriptRunner.ts and its unit test. Successful runOnWorktreeCreate (setup) actions still use closeIdle, as the issue scope and PR…
Full details: Title check

Explanation

The title names the main change: a successful settle script's terminal is now closed rather than left open in the worktree. It follows the conventional commit form and matches the raw summary, the objectives, and the linked issue.

Full details: Description check

Explanation

The description covers the problem, the change, scope, and verification. It follows the template sections (Problem, Change, Scope, Verification) and gives a clear root cause, the reason the fix is limited to settle actions, and test results including a failing-on-base case. The author noted a preexisting unrelated test failure on macOS. The description links the issue and states what was not checked. It includes an agent attribution, which the template requests.

Full details: Linked Issues check

Explanation

Issue #44350 requires that a successful settle action's terminal closes, even when the shell prompt is slow. The diff in apps/server/src/project/ProjectSetupScriptRunner.ts (merge base f3e3633 to head ce64ff2) changes the exitCode === 0 branch. When trigger === "settle", the runner now calls terminalManager.close for the settle terminal instead of the one-shot terminalManager.closeIdle. Failed actions (nonzero exit) still leave the terminal open. The settle terminal is new for each run and T3-owned, so the close does not depend on the prompt state. The PR adds a unit test, "closes a successful settle shell even while its prompt is still busy", in ProjectSetupScriptRunner.test.ts. The reported scenario run is a manual validation and is not a committed coding requirement. The fix covers the reported path. I did not re-run the test or the scenario. The diff uses the identifiers trigger and errorContext, which I did not separately confirm in the file, but the author reports typecheck passes.

Full details: Out of Scope Changes check

Explanation

The reviewed change is limited to the settle exit-0 path in ProjectSetupScriptRunner.ts and its unit test. Successful runOnWorktreeCreate (setup) actions still use closeIdle, as the issue scope and PR description state. The change does not touch closeOnSettle's sweep, which the PR explicitly excludes. The change adds no wire-contract change. Each change connects to the objective of #44350.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: f3e3633
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae6e7ffa-0ed3-4f13-8c51-f2bcba4948da
Commits

Reviewing files that changed from the base of the PR and between f3e3633 and ce64ff2.

Files selected for processing: 2

  • apps/server/src/project/ProjectSetupScriptRunner.test.ts
  • apps/server/src/project/ProjectSetupScriptRunner.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 27, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/settle-terminal-leak
698e506
@juliusmarminge

juliusmarminge commented Nov 27, 2026

Copy link
Copy Markdown
Member

Evidence

Linux, real isolated T3 servers with fresh synthetic state, Replay (dev), SHELL=/bin/bash, and PROMPT_COMMAND='sleep 2'. Configured echo $$ > <pid-file> as a settle action, completed a turn in a new worktree, invoked thread.settle through the app RPC, then observed the shell for 15 seconds.

The captures below replay real driver output at its recorded timestamps; they are runtime transcripts, not GUI captures.

Before After
Before: shell alive after 15 seconds After: shell exited and terminal removed
4bc38b1c5e 698e5063e6
Shell alive at +15s; terminal running; shell cwd equals worktree. Shell exited by +1s; no terminal remains at +15s.
Before recording · Transcript After recording · Transcript

Reproduction driver · Recording renderer.

Not shown:

  • The graphical Settle thread menu and macOS were not exercised; the proof covers the real Linux server through the thread.settle RPC.
  • The scenario runner was not used because its documentation excludes timing regressions.
All reactions

Sorry, something went wrong.

Uh oh!

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

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 27, 2026
@juliusmarminge
juliusmarminge merged commit c042549 into pingdotgg:main Nov 27, 2026
56 checks passed

Uh oh!

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

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 27, 2026
@smirea smirea mentioned this pull request Nov 27, 2026
fix(server): settle scripts run one at a time #44363
Merged
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
Upstream fixes (2026-11-27) Ryoku-dev/hyakki#13
Closed
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 27, 2026
@smirea @juliusmarminge @github-actions
fix(server): a successful settle script's terminal no longer stays op…
31d1951
…en in the worktree (pingdotgg#44351)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit c042549)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 27, 2026
@smirea @juliusmarminge @github-actions
fix(server): a successful settle script's terminal no longer stays op…
b4311c3
…en in the worktree (pingdotgg#44351)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit c042549)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 27, 2026
@smirea @juliusmarminge @github-actions
fix(server): a successful settle script's terminal no longer stays op…
62acb07
…en in the worktree (pingdotgg#44351)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit c042549)
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 28, 2026
@github-actions
nightly: 0.1.14-nightly.20261127.5359
1d412ec
**v0.1.14-nightly.20261127.5359** · 83 changes from 16 contributors

- **Physical devices.** Use enrolled phones and tablets from Simlock pools in the Device panel.
- **Jira Service Management comments.** Choose whether a comment is an internal note or a customer-visible reply.
- **Sidebar thread lists.** Busy project folders show six threads at a time, with controls to show more or less.
- **Preview positions.** Code, log, table, and notebook previews remember your place when you switch files or threads.
- **Faster source control.** Git controls and the command palette open faster by checking source control services in parallel.
- **Linked folders.** Browse and open files in folders linked from outside your worktree.
- **Multi-repository pull requests.** The Pull requests page now lists pull requests from repositories in multi-repository projects.

### Plus 75 more bug fixes and performance improvements.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): queued edits keep focus in the current thread by @StiensWout in pingdotgg/t3code#44237
* fix(client-runtime): work log previews scripts run with node -pe, python3 -uc or ruby -ne by @AymanKhan9 in pingdotgg/t3code#44252
* fix(server): selected commits show their subject when the message starts with blank lines by @only21mil in pingdotgg/t3code#44259
* fix(source-control): SCP-style remotes with @ or + in the username keep their host by @only21mil in pingdotgg/t3code#44256
* fix(server): preserve XLSX formulas with escaped blank caches by @jadelike-wine in pingdotgg/t3code#44261
* fix(cli): t3 theme set no longer ignores --id with a theme name by @iamshadmantaqi in pingdotgg/t3code#44268
* fix(server): preserve paragraphs in ODT text boxes by @jadelike-wine in pingdotgg/t3code#44265
* fix(web): notebook HTML outputs keep line-wrapped base64 images by @only21mil in pingdotgg/t3code#44260
* fix(server): t3_project_create from a title accepts a null default model by @only21mil in pingdotgg/t3code#44277
* fix(client-runtime): a renamed project keeps its name when another checkout joins its group by @smirea in pingdotgg/t3code#44281
* fix(web): the device panel opens in flat view by @maria-rcks in pingdotgg/t3code#43599
* feat(web): boring sidebar folders list six threads with Show more and Show less by @maria-rcks in pingdotgg/t3code#43598
* fix(web): shortcuts recorded on a Cyrillic or Greek layout keep working on a Latin one by @AymanKhan9 in pingdotgg/t3code#44275
* fix(server): omit hidden objects from PowerPoint attachment text by @jadelike-wine in pingdotgg/t3code#44287
* fix(server): keep saved names for imported Codex threads by @only21mil in pingdotgg/t3code#44284
* fix(server): keep EPUB table footers after body rows by @jadelike-wine in pingdotgg/t3code#44290
* fix(server): a provider handoff item no longer shows merge-back context by @only21mil in pingdotgg/t3code#44293
* fix(server): Antigravity turn with a finished reply completes when its prompt goes silent by @juliusmarminge in pingdotgg/t3code#44294
* fix(web): EPUB previews keep SVG drop-shadow filters by @only21mil in pingdotgg/t3code#44299
* fix(web): workflow run durations use the app language's units by @iamshadmantaqi in pingdotgg/t3code#44244
* fix(cli): resolve missing paths in linked worktrees by @jadelike-wine in pingdotgg/t3code#44305
* fix(web): GitHub sign-in code expiry follows the Time format setting by @AymanKhan9 in pingdotgg/t3code#44306
* fix(mobile): tapping an image in an html_render opens the image viewer by @juliusmarminge in pingdotgg/t3code#44315
* fix(server): keep Word phonetic guides after their words by @jadelike-wine in pingdotgg/t3code#44309
* fix(server): resolve favicon hrefs that use HTML references without a semicolon by @only21mil in pingdotgg/t3code#44314
* fix(server): /compact no longer runs on a session that lacks the thread's history by @juliusmarminge in pingdotgg/t3code#44295
* fix(client-runtime): work log labels unwrap $'...' and $"..." quoted shell scripts by @only21mil in pingdotgg/t3code#44322
* fix(web): ODT previews keep numbered lists by @only21mil in pingdotgg/t3code#44318
* fix(server): a resumed Claude session no longer counts its earlier turns again by @GLDRoger in pingdotgg/t3code#44311
* fix(server): separate nested cells in RTF attachment text by @jadelike-wine in pingdotgg/t3code#44327
* fix(web): collapsed reasoning rows no longer show footnote markup by @only21mil in pingdotgg/t3code#44337
* fix(web): EPUB previews keep tt and acronym tags by @only21mil in pingdotgg/t3code#44333
* fix(server): show the context handoff when an imported session's first send switches provider by @only21mil in pingdotgg/t3code#44332
* fix(server): skip EPUB passages hidden by important inline styles by @jadelike-wine in pingdotgg/t3code#44331
* fix(web): Enter sends dictation while focus is on the chat timeline by @BugByter123 in pingdotgg/t3code#44326
* fix(server): a successful settle script's terminal no longer stays open in the worktree by @smirea in pingdotgg/t3code#44351
* perf(server): pull request sweeps read threads through the shell index by @juliusmarminge in pingdotgg/t3code#44341
* perf(web): memoize model picker provider rows by @ndycode in pingdotgg/t3code#44338
* fix(forgejo): publishing a repository under your own name works in any letter case by @only21mil in pingdotgg/t3code#44348
* fix(client-runtime): work log labels unwrap timeout commands with options by @only21mil in pingdotgg/t3code#44357
* fix(azure-devops): partial clones scope az commands to their remote by @only21mil in pingdotgg/t3code#44346
* fix(mobile): ctrl then space sends NUL in the terminal by @iamshadmantaqi in pingdotgg/t3code#44359
* fix(web): closing a split pane in the right panel activates its neighbour by @iamshadmantaqi in pingdotgg/t3code#44358
* fix(issues): search Jira assignees past the loaded catalogue by @PixPMusic in pingdotgg/t3code#39944
* feat(issues): choose internal note or customer reply on Jira Service Management by @PixPMusic in pingdotgg/t3code#39942
* fix(server): separate footnotes from ODT attachment prose by @jadelike-wine in pingdotgg/t3code#44366
* fix(web): notebook previews use the kernel's language when language_info is missing by @only21mil in pingdotgg/t3code#44367
* fix(web): Markdown blocks keep the text direction their HTML sets by @only21mil in pingdotgg/t3code#44375
* fix(issues): a No project thread can read and write its linked Linear issues by @PixPMusic in pingdotgg/t3code#39938
* fix(client-runtime): NDJSON tool output keeps JSON highlighting by @only21mil in pingdotgg/t3code#44372
* fix(web): RTF previews keep nested table cells apart by @iamshadmantaqi in pingdotgg/t3code#44379
* refactor(server): launch commands through Effect 4.1.6's proxy process by @juliusmarminge in pingdotgg/t3code#44095
* fix(server): files in folders linked in from outside the worktree open in the files viewer by @juliusmarminge in pingdotgg/t3code#44381
* fix(web): the scheduled task menu translates Delete by @iamshadmantaqi in pingdotgg/t3code#44380
* feat(devices): Simlock pools offer enrolled phones and tablets by @bheemreddy-samsara in pingdotgg/t3code#37363
* fix(mobile): Changed files rows say 1 addition and 1 deletion by @iamshadmantaqi in pingdotgg/t3code#44376
* fix(web): code, log, CSV and notebook previews keep their place across files and threads by @Wraient in pingdotgg/t3code#44374
* fix(server): omit hidden sections from ODT attachment text by @Lucenx9 in pingdotgg/t3code#44384
* fix(server): settle scripts run one at a time by @smirea in pingdotgg/t3code#44363
* fix(client-runtime): work log previews node -e scripts after --input-type or --env-file by @only21mil in pingdotgg/t3code#44388
* fix(client-runtime): keep retrying direct routes when T3 Connect is off by @jadelike-wine in pingdotgg/t3code#44365
* fix(server): a link card stops reading as Awaiting Input once a later run completes by @juliusmarminge in pingdotgg/t3code#44397
* fix(web): RTF previews no longer drop double, dotted and other underlines by @only21mil in pingdotgg/t3code#44404
* fix(gitlab): issue renames show in Activity with the full new title by @only21mil in pingdotgg/t3code#44390
* fix(web): a link pasted into inline code stays plain text by @iamshadmantaqi in pingdotgg/t3code#44409
* fix(web): hide the extra TAR root folder by @StiensWout in pingdotgg/t3code#44411
* fix(server): a loaded Codex chat keeps working after a stdio MCP server is removed by @juliusmarminge in pingdotgg/t3code#44418
* fix(server): ODT attachments keep ruby readings in brackets by @iamshadmantaqi in pingdotgg/t3code#44412
* fix(diagnostics): count OTLP errors named Interrupted only as failures by @jadelike-wine in pingdotgg/t3code#44415
* fix(server): omit hidden paragraphs from ODT attachment text by @jadelike-wine in pingdotgg/t3code#44413
* fix(opencode): Go usage shows once across environments sharing a Console workspace by @juliusmarminge in pingdotgg/t3code#44425
* fix(server): a worktree delete that stops partway leaves a worktree Git can remove again by @smirea in pingdotgg/t3code#44406
* perf(server): source control discovery runs its probes in parallel by @juliusmarminge in pingdotgg/t3code#43651
* fix(desktop): a stop signal right after the AppImage t3 CLI starts no longer unmounts it by @juliusmarminge in pingdotgg/t3code#44445
* fix(web): settings search finds the worktree cleanup row by its title by @iamshadmantaqi in pingdotgg/t3code#44432
* fix(web,marketing): describe product usage data as pseudonymous, not anonymous by @nabertronic in pingdotgg/t3code#44428
* fix(web): EPUB captions honor frame offsets by @StiensWout in pingdotgg/t3code#44429
* fix(web): EPUB previews preserve SVG color adjustments by @StiensWout in pingdotgg/t3code#44419
* fix(server): adopt worktrees with Unicode line separators in their paths by @Lucenx9 in pingdotgg/t3code#44422
* fix(client-runtime): work log commands split with a trailing backslash show their script by @only21mil in pingdotgg/t3code#44427
* fix(server): imported transcripts keep the indentation of their first line by @only21mil in pingdotgg/t3code#44426
* fix(web): Usage access errors follow the app language by @iamshadmantaqi in pingdotgg/t3code#44431
* fix(server): multi-repository projects list their pull requests by @juliusmarminge in pingdotgg/t3code#44399

## New Contributors
* @BugByter123 made their first contribution in pingdotgg/t3code#44326
* @bheemreddy-samsara made their first contribution in pingdotgg/t3code#37363
* @nabertronic made their first contribution in pingdotgg/t3code#44428

**Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261127.5345...v0.1.14-nightly.20261127.5359

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261127.5359
aorwall added a commit to aorwall/t3code that referenced this pull request Nov 28, 2026
@aorwall
chore: merge upstream t3code to 85d855b (pingdotgg#310)
a986b52
This merges upstream `pingdotgg/t3code` at `85d855bd82` (base
`3ed650f999`, 683 commits) with a merge commit. It is not stacked: no
other merge PR was open. The decisions are recorded under the 2026-11-28
entry in `docs/fork/upstream-merge-log.md`.

## Numbers
- Landed `1576` files, and the upstream range is `1576` files. They
match exactly.
- The fork delta is `789` files (`git diff HEAD^2 HEAD`).
- 10 conflicts, all resolved by their path-policy verdict. 60 files
auto-merged, and `duplicate-adds` and `resolution-check` are clean.

## Conflict resolutions
- **`ChatMarkdown.tsx`**: takes upstream's `useFileDownload` and keeps
the `FEATURES.openInEditor` gate.
- **`ChatView.tsx`**: `ChatRightPanel` takes upstream's `ref` and keeps
the fork's `threadRef`.
- **`Sidebar.tsx`, `useThreadActionMenu.ts` and its test**: take
upstream's `canMarkLatestRunUnread` and keep `isPublic` and
`isFollowed`.
- **`ThreadDetailsPanel.tsx`**: the Artifacts section stays after
lineage, and upstream's new Agent tasks section comes after it.
- **`FilePreviewPanel.tsx`**: takes upstream's positioned
`useFileLineReveal` and keeps `browserFrameRevision`.
- **`PreviewView.tsx`**: imports both helpers.
- **`agentContextBudget.json`**: upstream plus 108 bytes (`62578`).
`AgentContextBudget.test.ts` passes.
- **`reviewCommentSelection.test.ts`** (`theirs`): the fork's cosmetic
rename of a test title is dropped.
- **Lockfile**: taken from upstream and re-installed, which restores the
fork's edges. `verify --only lockfile` passes.

## Fixes after resolving
These were caught by typecheck and tests, not by conflict markers:
- **`sandboxControl.placement.test.tsx`** passes upstream's new required
`onCloseSelectedSurfaces` prop.
- **`rightPanelStore.ts` `retargetFile`** uses upstream's module-wide
`++lastFileRevealRequestId` (pingdotgg#44374) rather than `revealRequestId + 1`,
which could reuse another surface's id. Its tests now compare ids
relative to each other.
- **`ChatView.browser.test.tsx`**: upstream's pingdotgg#43920 case now expects
"Sandbox required", because a draft has no sandbox. The file joined
`upstream-tests-fork-assumptions` in the inventory.

## Verification
- **Static checks:** duplicate-adds, tripwires, resolution-check,
unsupported-methods, lockfile, fmt, lint, typecheck and build all pass.
- **`@t3tools/web`:** 738 of 738 test files pass. This used
`PLAYWRIGHT_BROWSERS_PATH` with a fetched headless shell 1248, because
the image now ships 1255.
- **Known sandbox failures:**
- ssh `tunnel` and opencode `OpenCodeServerLedger` fail as on the last
merge.
- `t3` fails, and `verify` marks it as the `/tmp` sticky-bit gap. The
files that fail alone are the same set as 2026-11-26, plus
`processRunner.test.ts`. That one fails inside upstream's new spawn
proxy, and the file is not in the fork delta.
- **Commit:** made with `--no-verify` because of the known knip
pre-commit failure.

## Feature classification

### Usable as-is
- Open project imports from Projects settings (pingdotgg#44662).
- Copy chat tables as text or PNG (pingdotgg#44055, pingdotgg#43435).
- Rendered markdown preview from the file tree (pingdotgg#30027).
- Multi-select side-panel tabs (pingdotgg#43946).
- Copy paths from the file sidebar (pingdotgg#43360).
- Sidebar folder Show more and Show less (pingdotgg#43598).
- Agent tasks section in Thread details (pingdotgg#29705).
- Previews keep their place across files and tabs (pingdotgg#44374, pingdotgg#44517).
- EPUB, ODT, RTF, Word, CSV and archive preview fixes.
- Command-label rendering fixes (pingdotgg#43626).
- Shortcuts on non-Latin layouts (pingdotgg#44275).
- About 40 i18n fixes.
- Password-protected previews (pingdotgg#44008). These unlock on the client but
still need the file bytes from the backend.

### Unsupported in Moatless / needs implementation
- **Download file** from the Files panel and chat links (pingdotgg#43833,
`useFileDownload.ts`). It calls `assets.createUrl` with
`draft-workspace-file` and `disposition: "attachment"`. Moatless
`crates/t3code/src/assets.rs` `create_url` refuses that tag, so every
click shows a "Could not download file" toast. This is new in `gaps.md`:
*Download file asks for an asset resource Moatless refuses*.
- **Jira Cloud and Jira Service Management trackers** (pingdotgg#38003, pingdotgg#39942).
They add `credential.fields`, the `commentAudiences` and
`assigneeSearch` capabilities, and the `refresh` and `query` inputs.
Connecting stays refused, so nothing new shows. Extends the existing
Issue trackers item.
- **Usage-limits-only refresh** (`limitsOnly`, `unreadProviders`,
pingdotgg#41726), with no Moatless producer.
- **Remote `localhost` links through a port forward** (pingdotgg#44452).
- **Built-in browser HTTP Basic Auth** (`authChallengeId`, pingdotgg#35046).
- **Subagent environment display** (pingdotgg#44393).
- **Optional contract fields with no Moatless producer:**
  - `ProviderStatus.modelsIncomplete`
  - `PullRequest.host` and `changedFiles`
  - project link `readOnly`
  - `createdBranch`
  - orchestrator `favorite`
- No RPC method was added, so `unsupported-methods` reports no ADD and
no DROP.

### Backend behavior to consider reproducing in Moatless
This is recorded as a new range bullet under *Runtime fixes upstream
made to its own server* in `gaps.md`:
- **Settlement and worktrees:**
- Settle scripts are serialized, and shared worktrees skip them (pingdotgg#44363,
pingdotgg#44491).
  - A successful settle closes its script terminal (pingdotgg#44351).
  - Settling a delivered delegated child archives it (pingdotgg#44615).
  - A partially deleted worktree stays removable (pingdotgg#44406).
- **Child and background work:**
  - Delegated completions wake the thread's own session (pingdotgg#44637).
  - `task_cancel` also cancels queued follow-ups (pingdotgg#44560).
  - A thread stays Working until a late subagent finishes (pingdotgg#44453).
  - A Monitor-woken child is not cut off (pingdotgg#43899).
- **Titles and launches:**
  - Titles stop at the first line break (pingdotgg#44597).
  - A title the provider refused is not retried (pingdotgg#44057).
  - A blank `t3_thread_launch` starts no turn (pingdotgg#44467).
  - A pre-launch message no longer strands the run (pingdotgg#44133).
- **Provider sessions:**
  - Idle threads detach from shared sessions (pingdotgg#44020).
  - `/compact` and handoff token caps (pingdotgg#44295, pingdotgg#43868).
- **Read paths:**
  - Shared thread reads for PR sweeps (pingdotgg#44369, pingdotgg#44341).
  - Filtered turn-item reads (pingdotgg#43981, pingdotgg#43549).
  - Limited rescans (pingdotgg#43969).
  - Checkpoints skip nested checkouts (pingdotgg#43744).
  - PR watches with no required checks (pingdotgg#42787).

## Owned-concern sweep
There were 3 hits: mobile app-state wakeups, the server issue tracker
host and Cursor Origin lookup. All three are upstream's own and were
taken. No new upstream workflows arrived.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/1fcda118-593a-4d92-9b13-dc7667eabe2c
@omegent-app omegent-app Bot mentioned this pull request Nov 28, 2026
Merge upstream main through 0f78747290a1 patroza/t3code#688
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: A successful settle action's terminal stays open in the settled worktree when the prompt is slow

Uh oh!

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

2 participants

@smirea @juliusmarminge
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 01402775 — 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.