Skip to content

Inbox: start new agents in T3 Code, as in Rex - #3595

Merged
backnotprop merged 32 commits into
mainfrom
feat/inbox-launch-t3
Nov 28, 2026
Merged

backnotprop merged 32 commits into
mainfrom
feat/inbox-launch-t3

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

This push: fixes from the independent review (F1, F3, F4; F2's classification)

Merged main at cd9066c76d (clean). No words a person reads changed: every line below uses strings this PR already had.

F1: Codex, OpenCode and Pi in T3 Code were never seen as connected. T3 gives its thread id (T3CODE_THREAD_ID) only to the Claude it runs, so only Claude reaches the Inbox as the T3 thread. Codex, OpenCode and Pi write under their own session ids, and nothing t3 thread show/list prints names those ids. So ten minutes after the start, their run line said " opened in T3 Code but hasn't connected to the Inbox", even when the agent had already answered.

  • Now the launched agent also counts as connected once it writes in the launch's own thread (t3LaunchWriterOf, heardFrom). The writer must meet all of these:
    • it is a session of the launch's agent, or, for a Claude Code launch only, the T3 thread itself;
    • it wrote after the start;
    • its first message in this Inbox is in this thread;
    • no person's message addressed it or tagged it there before it wrote;
    • it is no other launch's session.
  • Another session of the same agent working in the same folder never counts, unless it wrote here first.
  • The person's next reply goes to the session that wrote. For Codex, that is through the Codex wake's existing T3 path (t3 thread send into the same T3 thread). OpenCode and Pi get it through their own Inbox client. The T3 wake leaves it alone, so the reply is delivered once.

F3: an Inbox restart could lead to a second thread and a double delivery. On Try again, adoption skipped every T3 thread whose session the Inbox knew. That included the launch's own thread once its agent had written in it.

  • Adoption now skips only threads that belong to another launch or another Inbox thread (sessionElsewhere). It takes a thread only when exactly one candidate fits.
  • If the start's agent has already written, nothing new starts, here or in the background (start(…, { wrote })).
  • A start the Inbox closed during whose agent has since written now settles on its thread by itself, with no Try again (settleWritten). For Claude, the thread is the session that wrote, once thread list shows it under the launch's title. For the other agents, the thread is found with thread list.

F4: Try again after a start whose thread list had failed. The start record now keeps listed: false and how the start ended. On Try again, the Inbox lists the threads again and takes the thread by its title and T3's createdAt. If T3 still can't list the threads after an uncertain start, nothing new starts and the line stays as it was.

F2 (classification only): a T3 whose CLI has no --option refuses the flag with Effect's CLI parser words, "Unrecognized flag: --option in command …". That refusal is now handled as the existing "didn't take the effort" case: one more start on the person's model without the effort. Before, it was recorded as "T3 Code didn't take the model". The words come from T3's vendored effect/cli in an older T3 source than the installed 0.1.9.

Tests (stand-in t3 only, in a scratch home; nothing fakes "heard", and each agent writes under the identity its own Inbox client would have inside T3):

Test file Result
new inbox-launch-t3-agents 12/12
inbox-launch-t3 34/34
inbox-t3-local 33/33
inbox-launch-t3-ready 3/3
inbox-launch-t3-rex 2/2
agentsModel 17/17
inbox-structure 5/5
  • tsc is clean for server, shared, inbox and the hook server.
  • I also ran the new tests against the code before this push: 9 fail and 3 pass. The 3 that pass guard behaviour that must hold both before and after: an unrelated session is not taken; with no write, Try again adopts; another launch's thread is never adopted.

Known, not fixed

  • F2: whether a real T3 0.1.9 accepts --option=effort=… at all. Only a real T3 can answer that.
  • F5: the 60 s grace counts from the start of run(). T3 attempts can use it up before the fallback to the agent's own host.
  • F6: every start runs t3 project add, so each folder becomes a permanent T3 project. This is the owner's decision.
  • F7: a T3 project set to "new worktree" runs the agent in a worktree, not exactly the Inbox's folder.
  • F8: any refusal other than "rejected options" or an unknown --option, on the person's pick, is recorded as declined=<model>.
  • Read finding 4 (D): after an uncertain start, if T3 Code is closed at Try again and the agent has not written, the agent starts in the background, so a second agent can run on the same message (older than this PR's fixes).
  • Read finding 5 (E): if Claude in a cut-short thread writes its first message in a new Inbox thread, its T3 thread counts as elsewhere, and Try again starts a second thread.
  • Read finding 6: wrote can be true with nothing pending (an untrusted folder waiting for Trust folder, or a same-agent writer), so the line keeps "The Inbox closed while T3 Code was starting" and Try again never starts anything.
  • Unverified: the person's reply to OpenCode or Pi in T3 goes through their own Inbox client in T3's process. Whether T3 shows a turn started that way, and what happens once T3 releases an idle provider process, needs a real T3.
  • Unverified: adoption matches a thread by its title. If T3 renamed the thread, the thread is not found. For Codex, OpenCode and Pi whose agent already wrote, the line then keeps its Try again and no second thread starts. For Claude, the session that wrote names the thread, but it is taken only when T3 lists it under the launch's title.

Earlier push (merge of main, no feature change)

  • Merged main at dc0fbb8d7e (merge commit 4891917a74). Main had moved by 384 commits. Nothing a person sees or reads changed beyond what this PR already did.
  • Two conflicts, resolved by hand:
    • packages/inbox/agents/model.ts. Main (Inbox: name sessions started in Oh My Pi "Oh My Pi" (#3443, part 1) #4075, the Oh My Pi name) replaced INBOX_HOST_NAMES with inboxHostName(host, runtime), and the hover card now calls agentHostName(agent.host, agent.runtime). This branch adds the T3 inner-agent words ("T3 Code (Claude Code · opus)"). The resolution keeps both: the host name comes from main's runtime-aware helper, and the T3 wrapper goes around it as before.
    • apps/mobile/contract/parity/ledger.json. Took main's copy, then regenerated it with bun scripts/mobile/all.ts, which put back this branch's T3 wire fields. bun scripts/mobile/check.ts passes.
  • bun.lock: regenerated by bun install. Against main, only workspace versions change (0.29.5 to 0.29.6). Main's own lock was behind its package.json.
  • Checked the files both sides auto-merged: inbox-types, AgentsSection, Thread, inbox-agents-list, config, store, inbox.ts and the docs.
    • Oh My Pi on main is a naming runtime of Pi, not a new launch host, so it does not change which agents start in T3 Code.
    • Every Stop gate (inboxLaunchStops) still gets the T3 flag.

Verified / not verified

Verified on this head (locally):

  • tsc is clean for core, shared, server, inbox, apps/inbox and the hook server.

  • Tests, each run on its own:

    Test file Passed
    inbox-launch-t3 34/34
    inbox-launch-t3-rex 2/2
    inbox-launch-t3-ready 3/3
    inbox-t3-local 33/33
    agentsModel 17/17
    ohMyPiName 2/2
    DOM agentsSettings 23/23
    DOM remoteLaunchThread 4/4
    inbox-structure 5/5
    dom-test-allowlist 1/1
    agents-md-size 3/3
  • A sandboxed Inbox built from this head, with a t3 that does nothing and T3 not running:

    • Settings → Agents shows "In the background · T3 Code" and the T3 sentence.
    • It also shows "T3 Code isn't open on this computer now, so new agents start in the background until it is."
    • The settings read reports t3_here: true, t3_open: false and t3_agents Claude Code, Pi, Codex and OpenCode.

Left to CI: the two-Inbox test inbox-remote-launch-t3.test.ts and the browser spec tests/e2e/inbox-launch-t3.spec.ts. Both start Inboxes.

Only from the stand-in T3 (tests/helpers/fake-t3.ts), never a real T3 Code:

  • the success output of t3 thread start
  • the first turn reaching the agent
  • the agent connecting back to the Inbox
  • a reply going in through t3 thread send
  • the model order and the token for the model list

Seen against a real T3 Code (0.1.9, 2026-11-18, on an earlier head of this PR, no thread made):

  • T3's refusals for "not running" and "not a project", word for word.
  • t3 thread start . - --title=… --json parsed as far as T3's project check.
  • t3 project add <folder> adds the folder (0.25 s).
  • A project T3 has just added has no default model. That is why this PR names a model.

Not verified at all:

  • That an installed T3 accepts --subject=mcp-client --ttl=1m and --provider/--model.
  • That a T3 thread actually starts, connects and answers.
  • Linux. On Windows the feature is off by design.

What a person can do now

Settings → Agents → Start new agents in now offers T3 Code, beside "In the background" and "Rex". The option shows when T3 Code's t3 is on this computer, or when it is already the choice. This follows the Rex setting. T3 Code is not an agent in To. The person picks Claude Code (or Codex, OpenCode, Pi) in New message and presses Send, as before. The agent then starts as a new T3 thread on that agent, in exactly the Inbox's folder, and the message is its first turn. The model and effort picked in New message are used, as Rex uses them. With none picked, T3's own model is used. There is no other step.

  1. Settings → Agents → Start new agents in → T3 Code. Below the choice: "In T3 Code, each new agent runs as a thread of T3 Code for its project, and keeps running there after the Inbox closes. Claude Code, Pi, Codex and OpenCode can start in T3 Code." If T3 Code is closed: "T3 Code isn't open on this computer now, so new agents start in the background until it is."
  2. New message → To → Claude Code in a project → write → Send.
  3. The run line says "Starting Claude Code in T3 Code…", then "Started in T3 Code", then the usual working lines. The thread header says "You started Claude Code in shop · In T3 Code · opus".
  4. Replies go into the T3 thread through the T3 wake that exists already. Stop, Open in Terminal and Try again are not offered, because T3 Code has no outside Stop. Permission prompts wait in T3 Code's app.

Where it runs

Every start first runs t3 project add <folder>. "Already exists" counts as done. T3 runs . in the deepest project that holds the folder, or, when no project holds it, in another git checkout of the same repository (T3's resolveProject in cli/thread.ts). Without the add, a folder inside another T3 project, or a git worktree of a repository T3 has, would run in that other folder. The stand-in now resolves projects the same way, and a test covers both cases.

How the model is picked

  1. The person's pick in New message, with its effort, as Rex does: --provider=<the agent's T3 instance> --model=<pick> [--option=effort=<v>].
  2. None picked: the model of the newest thread T3 ran that agent on in the project, read with t3 thread list --json. T3's own CLI reads it under its own session, so the Inbox needs no credential.
  3. Neither: T3's own first model for that agent that can run now. It is read once from orchestrator_capabilities on T3's loopback /mcp, under a token that the person's own T3 issues for this one read (see Security below). This is the only case that uses a token.
  4. A model T3 refuses gets one more start on T3's own model: the newest thread's, else the listed one, and the token only then. The thread header then says "(T3 Code didn't take )". If that start fails too, the agent starts in the background, and the line names the person's model.
  5. An effort T3 refuses (T3's words: "Model … rejected options: …") gets one more start on the person's model without the effort. The header says "(T3 Code didn't take the effort )", and the background line says the effort, not the model.

No simpler route exists for step 3. T3's CLI has no command that prints the models or the default. thread start with no model fails on a project that has no default. The defaults are kept behind T3's auth.

When T3 Code can't take it

The agent starts in the background, the same as without the setting, and the line says why. This is the Rex behaviour:

  • T3 Code not installed, not running, or not answering: "T3 Code isn't open on this computer, so it started in the background." (launch.t3.unavailable)
  • T3 said no (launch.t3.refused), and the line says what it refused:
    • "T3 Code didn't take the model {model}, so it started in the background." (declined)
    • "T3 Code has no model for it here, so it started in the background." (why: "no_model"; this also covers a T3 too old to issue the token)
    • "T3 Code didn't take the effort {effort}, so it started in the background." (declined_effort)
    • "T3 Code didn't add this folder as a project, so it started in the background." (why: "project")
    • otherwise "T3 Code didn't start a thread for it, so it started in the background."
  • If T3 says the thread's run failed (for example, its agent is not signed in there), the not-connected line shows at once instead of after ten minutes.
  • A start that may have made its thread fails with Try again instead. This covers no answer in 30 s and an answer that names no thread. Try again takes that thread and never makes a second.
  • A routine's run never starts in T3 Code, as with Rex.
  • The Inbox never opens T3 Code's app. The earlier draft of this PR opened it; that code is gone.

Every string, and the Rex string it mirrors

T3 Code Rex
Start new agents in: T3 Code Rex
In T3 Code, each new agent runs as a thread of T3 Code for its project, and keeps running there after the Inbox closes. {names} can start in T3 Code[; {others} always start in the background]. In Rex, each new agent runs in its own tab of a Rex session for its project, and keeps running there after the Inbox closes. {names} can start in Rex[; …].
T3 Code isn't open on this computer now, so new agents start in the background until it is. Rex isn't open on this computer now, so new agents start in the background until it is.
Starting {agent} in T3 Code… Starting {agent} in Rex…
Started in T3 Code Started in Rex · {session} / {tab}
{agent} opened in T3 Code but hasn't connected to the Inbox. Look at its thread there. {agent} opened in Rex but hasn't connected to the Inbox. Look at its tab there.
T3 Code isn't open on this computer, so it started in the background. Rex isn't open on this computer, so it started in the background.
T3 Code didn't start a thread for it, so it started in the background. Rex didn't open a tab for it, so it started in the background.
T3 Code didn't take the model {model}, so it started in the background. · T3 Code didn't take the effort {effort}, so it started in the background. · T3 Code has no model for it here, so it started in the background. · T3 Code didn't add this folder as a project, so it started in the background. (Rex says no in one way only)
Thread header: (T3 Code didn't take {model}) · (T3 Code didn't take the effort {effort}) (none)
This agent runs in T3 Code. Stop it in its thread there. (409 launch_in_t3, as Rex's launch_in_rex) (Stop of a pane the Inbox doesn't know) The Inbox doesn't know its tab in Rex. Stop it in its tab there.
This agent runs in T3 Code. Open its thread there. This agent runs in Rex. Open its tab there.
This agent runs in T3 Code. Look at its thread there. (Try again of a started thread) (none: a Rex start can be tried again)
Thread header: In T3 Code · {model} (none)

Security review: the token for the model list

  • What is created: one T3 bearer session, made by the person's own T3 with t3 auth session issue --scope=orchestration:read --subject=mcp-client --ttl=1m --label="Plannotator Inbox" --json.
    • orchestration:read is T3's own scope for a read-only MCP client (mcpClientScopes("read-only")).
    • mcp-client is the only subject that T3's /mcp accepts.
    • The session lives one minute at most. The Inbox revokes it with t3 auth session revoke <sessionId> right after the one call, whatever the call returned.
    • It is made only when the person picked no model and T3 has no thread on that agent in the project (or T3 refused that thread's model), at most once per start.
  • Where it lives: in one local variable of t3AskModels (packages/server/inbox-launch-t3.ts), read only by the T3 client's token getter for one orchestrator_capabilities call. The variable is cleared in finally, and the client is closed.
  • Where it never goes:
    • Not to disk.
    • Not into start.log. The log records the issue command and its exit code, never its stdout.
    • Not into the debug log or a log line.
    • Not onto a command line or into a child's environment.
    • Not to any address except the loopback origin in T3's own server-runtime.json. An https: or non-loopback origin gets no token, and no token is asked for.
  • Test: packages/server/inbox-launch-t3.test.ts, "no thread on that agent yet…". It runs the engine with the Inbox's debug log on, at <dataDir>/inbox/debug.log, then greps every file under the data folder: debug.log, start.log, the store and t3-start.json. It also greps every logged line and every t3 argv and env that the stand-in recorded. The random token appears in none of them.
  • What a hostile local process could gain: nothing beyond what it could already ask the same local T3 for.
    • Getting such a token needs the person's own t3 CLI and T3 home, which any process running as that user already has.
    • The token can only read orchestration state, and only for its minute.
    • A process that reads the Inbox's memory or intercepts loopback traffic as that user can already run t3 itself.
  • Inbox only (Bun). The Pi server has no Inbox, so apps/pi-extension needs no twin.

What the stand-in proves, and what only the real T3 can

tests/helpers/fake-t3.ts now answers auth session issue (pretty JSON, as T3's formatIssuedSession prints it) and auth session revoke. It records the flags but never the token. Its MCP server accepts only the issued token.

The tests prove:

  • the model order: newest thread, then T3's list, then the background;
  • the token's scope, subject, TTL, label, single use and revoke;
  • loopback only;
  • the token on no disk and in no log;
  • every fallback and its record: down, stale, missing, too old, nothing listed, a refused model, a refused project add;
  • the folder is always its own T3 project: a parent project and a linked checkout both resolve to it;
  • the person's model and effort are passed as picked, with no token;
  • a refused model gets one retry (the newest model, else the listed one) and is named;
  • a refused effort gets one retry on the same model and is named as the effort;
  • a clone that brings hooks, with T3 chosen, waits for trust, and Trust folder starts it in T3;
  • a failed T3 run shows its line at once;
  • Stop, Open and Try again refused;
  • routines and the background setting never asking T3;
  • Rex and T3 Code never both asked;
  • the Settings row's reads and save, in a DOM test.

Only a real T3 can prove:

  • that --subject=mcp-client and --ttl=1m are accepted by the installed T3 version;
  • that T3's claudeAgent takes the Inbox's model ids (for example sonnet);
  • that orchestrator_capabilities answers with that token;
  • that thread start with no --worktree makes the thread where T3's New thread would.

A minimal real check is written for the owner.

Other changes the review asked for

  • A folder the agent doesn't trust yet, such as a cloned repository that brings hooks (decision 4a), waits for the agent's own Trust folder before the T3 start, as Rex's start does. Nothing starts in T3 or in the background until then. The line's Trust folder saves the agent's own trust, then the T3 start goes on in that folder. A test clones a repository with hooks while T3 Code is chosen, and checks this.
  • The Agents hover says "T3 Code (Claude Code · opus)", never "Claude Code (Claude Code · opus)".
  • A reply written while a start runs is moved to the new session only for a start that took the first turn (T3 Code). Other starts are as on main, and a test covers that.
  • The effort check is back to main's, exactly.

Tests

  • New: tests/helpers/t3-launch.ts, the engine with the setting, against the stand-in, with the agents' own hosts as stand-ins.
  • Rewritten for the setting:
    • packages/server/inbox-launch-t3.test.ts
    • inbox-launch-t3-ready.test.ts
    • inbox-launch-t3-rex.test.ts
    • inbox-remote-launch-t3.test.ts (two Inboxes; CI only)
    • packages/inbox/remoteLaunchThread.test.tsx
    • the new T3 Code test in packages/inbox/agentsSettings.test.tsx
    • tests/e2e/inbox-launch-t3.spec.ts
  • The compose, routines, connection and contract files that the earlier draft changed are back to main.

New message → To → New T3 Code session in a project that is a git
repository runs T3's host command, t3 thread start . - --worktree <branch>
--title <name> --json, in the project's folder. T3 Code makes the thread in
a new worktree from the branch the folder has checked out; the message (the
T3 wake's own text for it) is the first turn on stdin and is recorded as
delivered, so replies go in through the existing T3 wake once.

T3 Code is offered only where a t3 is found and only in projects that are
git repositories (starts_in, worktree in the launch block); no scratch,
other folder or clone. When T3 refuses, the run line quotes T3's reason
with Try again. The thread is T3's: no Stop, and routines don't offer it.
…n Settings → Agents

T3 Code not open (no server, or one not answering) and a folder T3 doesn't
know get the host's own sentence; no answer in 30 seconds keeps its own.
Any other failure shows T3's last line as a fallback, with each absolute
path cut to its last name. The Settings → Agents launch row lists T3 Code,
which its switch now also governs.
…3 launch

- The To line's model button lists T3's agents and models ("Claude Code · opus"),
  from orchestrator_capabilities when signed in, else the pairs T3 threads used
  (thread list), else Default only. A pick passes --provider/--model and
  --option=effort=; Default passes none. The last pick is kept per machine.
- After the start, thread show names what T3 runs it on, in the thread's header
  and the agent row's card.
- The T3 wake never takes the launch: placeholder for a T3 thread.
- One store write moves the root, marks it delivered and re-addresses replies
  written during the start.
- Try again adopts the thread a timed-out or cut start made (thread list by
  title), with plain words for an Inbox restart mid-start.
- The not-connected line after 10 minutes with nothing heard from the thread.
- The server refuses Stop for a T3 launch, and T3 Code for routines.
- Every flag in the --name=value form. T3 not open names the machine.
- A dotfiles repository at home does not make every folder a git project.
- A two-Inbox test for T3 on a linked machine.
…d line

- Try again adopts a T3 thread only after an uncertain start (timeout, a
  start that named no thread, an Inbox restart during it), never after T3
  refused, never one made before the start or already tied to another
  launch or Inbox thread. Two messages with the same title no longer share
  a thread, and a first message is never marked delivered into the wrong one.
- The not-connected line asks T3 first (thread show: status, activeRunId,
  pendingRequestCount) and shows only once the turn ended or T3 can't be
  asked; the 10 minutes count from the Inbox's own start when later. For
  T3 the line has no Try again, the server refuses one in plain words, and
  a T3 launch is never respawned, so it never reads "stopped".
- A last model T3 no longer lists falls back to Default, and a Send or Try
  again with it is refused in words; T3's own refusal words show otherwise.
- The T3 MCP connect has a time limit.
- Tests: the reviewer's same-title scenario, long turns and restarts, the
  no-retry line, routines refusing T3 on create and edit, the test-run t3
  lookup, and the real first-turn text in unit tests.
…ce a turn ended

- "T3 Code doesn't list <agent> · <model>." (was "no longer lists", false for a
  model that was never listed). Refused only on a signed-in T3's capabilities,
  never on the "already used" list; tested both ways.
- Once T3 said a thread's turn ended, the not-connected line no longer runs
  `t3 thread show` each minute.
- Docs: the follow-ups C2, C3 and C4.
@backnotprop
backnotprop marked this pull request as ready for review November 17, 2026 16:34
…rted here

The not-open line named this machine even in its own window (on a CI box, a
raw host name). It now names the machine only for a launch another linked
machine sent here, with the name linked machines know it by, as the engine's
own not-ready line does; a launch started here reads "this computer".
ComposeDialog grew past its size ceiling with the T3 Code launch. The start a
pick makes (another folder, the scratch folder, a project, T3 Code's own
projects and worktree) and Add agent's default start are now pure functions in
compose/model.ts (`composeStartOf`, `addAgentStart`), with a unit test, and the
dialog calls them. ComposeDialog is 1883 lines, and its ceiling follows it down.
@backnotprop backnotprop added ci:e2e Run the full browser suite (Inbox window e2e) on this PR and removed ci:e2e Run the full browser suite (Inbox window e2e) on this PR labels Nov 17, 2026
… first model To lists; plain words when none is
Settings → Agents' "Start new agents in" gains T3 Code. A Send starts the
person's Claude Code, Codex, OpenCode or Pi as a T3 thread on the model T3
last ran that agent on in the project, else T3's own first model for it,
read once with a one-minute read-only token T3 issues and revoked after.
When T3 Code isn't open or says no, the agent starts in the background and
its line says why. T3 Code is no longer an agent in To, and the Inbox never
opens T3's app.
@backnotprop backnotprop changed the title Inbox: start T3 Code from New message, in a new worktree Inbox: start new agents in T3 Code, as in Rex Nov 19, 2026
Every start makes the Inbox's folder a T3 project of its own first, so T3
never runs the thread in a project that holds it or in another checkout.
The model picked in New message goes to T3 with its effort, as Rex does;
only with none picked does the project's newest thread or T3's list (the
token) decide. A model T3 refuses gets one more start on T3's own, and the
line says what T3 refused. A run T3 says failed shows its line at once.
Clones wait for the agent's own trust; the Agents hover says T3 Code; Stop,
Open and Try again refuse with launch_in_t3. Early replies move only for a
start that took the first turn, and the effort check is main's again.
A folder the agent doesn't trust yet, such as a clone that brings hooks,
now waits for its own Trust folder before the T3 start, as Rex's start
does, and Trust folder saves that trust and starts it in T3. An effort
T3 refuses gets one more start on the person's model without it, and the
line and header name the effort, not the model.
…-work

# Conflicts:
#	apps/mobile/contract/generated/swift/Wire.swift
#	apps/mobile/contract/parity/ledger.json
#	docs/agent-guides/inbox-launch.md
#	docs/agent-guides/server-and-storage.md
#	packages/inbox/components/Thread.tsx
#	packages/server/inbox-agents-list.ts
#	packages/server/inbox-launch.ts
…-work

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
…-work

# Conflicts:
#	apps/mobile/contract/parity/ledger.json
#	packages/inbox/agents/model.ts
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 28, 2026
…n Try again

Only Claude Code in a T3 thread reaches the Inbox as the thread (T3 gives
T3CODE_THREAD_ID only to its Claude). Codex, OpenCode and Pi write under
their own session ids, so after the ten-minute wait their run line said
"hasn't connected" even when they had answered. Now an agent counts as
connected once it writes in the launch's own thread: a session of the
launch's agent (or the T3 thread), since the start, whose first message in
this Inbox is in that thread, that no person brought in before it wrote,
and that is no other launch's.

Adoption on Try again skipped any T3 thread whose session the Inbox knew,
including this launch's own once its agent had written, so a start the
Inbox closed during could make a second thread and deliver the message
twice. It now skips only threads that are another launch's or another
Inbox thread's, takes exactly one candidate, and works with no list before
the start (by T3's createdAt). A start whose agent already wrote never
starts anything new, here or in the background; such a launch settles on
its thread by itself. When T3 can't list the threads at Try again after an
uncertain start, nothing new starts and the line stays.

A T3 whose CLI has no --option ("Unrecognized flag: --option") is read as
the effort not taken, not the model.
- Two or more threads that a cut-short start may have made: Try again takes
  none and starts no new thread; the line stays (t3MadeOf).
- A T3 thread's words count as the launch's agent only for a Claude Code
  launch; settleWritten takes a Claude writer's thread only once T3 lists it
  under the launch's title.
- While another start of the same title in the same folder is running, its
  thread is never taken by this launch's Try again.
- A start whose named thread another launch already holds settles on neither:
  the uncertain line, and Try again takes that thread once it is free, never
  a new one.
# Conflicts:
#	apps/mobile/contract/parity/ledger.json
#	packages/inbox/components/RunLine.tsx
The T3 spec's launch helper read the Send's answer with
waitForResponse(...).json(), DevTools' copy of the body. Chromium sometimes
keeps none for an answer the window reads as a stream (microsoft/playwright#42742),
so the second test failed with "No data found for resource with given
identifier" though the window read the answer. Read it as the other launch
specs do since acd07ad: from a copy of the window's own Response
(page-answer.ts nextPostAnswer).
@backnotprop
backnotprop merged commit b62738b into main Nov 28, 2026
52 checks passed
DuongCoder04 pushed a commit to DuongCoder04/plannotator that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant