Repository navigation
docs(agents): teach agents the thread ownership vocabulary - #768
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
fa52642 to
1e904dc
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1e904dc to
3b9c8ea
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
3b9c8ea to
7e22c72
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
7e22c72 to
ec0d25e
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The injected instructions still describe every launch as a top-level thread. Explain the thread kinds, default ownership, promotion and archive consent, and exercise the owner's requests in the tool-use eval. GPT-6.2 Sol via Codex in T3 Code. Carry-Group: incubator Carry-Fix: #751
A wrap-up can close its own turn, so ask which conversations to keep first and exercise both sides of the choice in the eval. Scope native subagent guidance to subagent requests and clarify when a delegated task can be promoted. GPT-6.2 Sol via Codex in T3 Code. Carry-Group: incubator Carry-Fix: #751
An explicitly grouped thread can sit under a different conversation while keeping its owner. Qualify the default in the agent guidance and sidebar guide. GPT-6.2 Sol via Codex in T3 Code. Carry-Group: incubator Carry-Fix: #751
A retention statement followed by an unrelated question previously passed. Require the consent question to refer to the retained conversations. GPT-6.2 Sol via Codex in T3 Code. Carry-Group: incubator Carry-Fix: #751
Expect owned-task wording while retaining the routing guards. Accept the consent question phrased as an inline choice without admitting unrelated questions. GPT-6.2 Sol via Codex in T3 Code. Carry-Group: incubator Carry-Fix: #751
ec0d25e to
19565ab
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Part of #751 When `delegate_task` refuses a different local project, point authorized work to `t3_thread_launch` in that project. For an isolated request, let T3 create the worktree. Include a callback when the caller will use the result. GPT-6.1 Sol at medium effort, with #768 on both sides - Recovery passed 0/3 on main and 3/3 completed samples with the new wording. A replacement passed after one provider stream ended early. - Same-project delegation passed 3/3 on both. - Quick CI, 634 focused tests, eval typecheck, and lint passed. The tool-list and injected-text budgets changed by 0 bytes. Local review: 4 rounds with GPT-6.1 Terra (xhigh), approved. Carry-Source-Ref: refs/lastcode/carry-sources/pr-783/6fc2fc545d3f29a2057c9d6fac6c447673ecffe7 Carry-Source-Base: 1aaf768 Carry-Source-Head: 6fc2fc5
Part of #751 ## What this PR does Archive preview now shows owned conversations on linked environments and names peers it cannot check. This is part 1 of the two-PR split of D4. Linked threads stay open unless the user explicitly selected them through another archive entry in a bulk selection. ## What users see - An available machine lists its owned threads with project, typed-in, active, unread, and protected state. Ordinary archive, bulk archive, saved-workspace confirmation, and the mobile alert use the same information. The `t3_thread_archive_family` tool returns per-machine sections. - An offline machine shows **Pending · Offline**. A refusal shows **Blocked · Access denied**. An older build shows **Blocked · Update this machine to review its threads**. - Each destination applies the paired link's authorization and walks its recorded ownership for the source thread and that thread's locally owned work. Work owned through a second peer needs a separate review. - Peer inventory is read-only. Once the local roster supplies the machine names, owner lookup, link resolution and requests use the remaining time in a shared one-second budget. Each machine's result is retained as it answers. Bulk previews run concurrently and list the selected threads with archive labels and locations. An unavailable peer prompts for review. Empty inventories alone leave the normal idle archive flow in place. ## Archive and restore in part 2 Part 2 records one operation per local archive generation, with an exact selection and receipt for each destination. Local archive finishes independently of the peers. An explicit retry reuses a reviewed selection while it remains valid and asks for fresh review when the destination could not be inspected. Restore reopens the exact committed threads and reports unreachable destinations for retry. The recorded selection preserves consent without a standing retry service. ## Verification - GitHub CI and Codex review passed on `6b36558175043c85896f9bea8ffc88103ca567b9`, with zero unresolved review threads. [GitHub CI](https://github.com/lastobelus/lastCode/actions/runs/44703913066) · [Codex review](#772 (comment)) - Rebased over #771 so local temporary-project removal and linked preview appear in the same confirmation. The later rebase over #768 required regenerating only the context budget. The rebase passed 118 focused tests, 81 web checks, 17 Chromium tests, and the translation catalog check. The final deadline and bulk-label fixes passed 33 focused tests and scoped lint. Quick CI passed on `6b36558175043c85896f9bea8ffc88103ca567b9` against `1aaf7683dc0d16bb937721b7b1585f25348f4379`. - Production indexed reads exercised two separate SQLite environments. The fixtures included transitive ownership across projects, archived and deleted intermediates on both sides, and a thread ID reused under a different environment. Transport tests checked link authorization, refusal, offline, unsupported, and the deadline during both resolution and HTTP. - In the isolated dev app, the real web client named an expired test link as blocked and moved the local thread to Archived after confirmation. The Incognito QA tab paired with the isolated dev credential. Chromium component tests rendered available, offline, and older peers. Mobile tests exercised alert contents and local archive consent. - Six batches of 50 synthetic local archive commands per checkout measured dispatch through completion, with shared dependencies. Median was 3.047 s on the original main baseline, with a 2.081–3.230 s range. The preview branch measured 3.106 s, with a 1.981–3.472 s range. The archive command does not call peers. - The archive tool eval passed 17/18 samples with GPT-6.1 Sol on the final head. Five cases passed 3/3. The busy-owner case passed 2/3, matching a run against main at `1aaf7683dc0d16bb937721b7b1585f25348f4379`. The one failure skipped the archive-family inspection while leaving the busy owner and its work alone. The same case was 0/3 after #768 with the earlier preview wording, and all six cases passed 18/18 before #768. - Repository budget bytes moved from 23,198 to 23,198 for Claude system append, from 24,196 to 24,196 for Codex additional context, and from 85,506 to 85,503 for the MCP tool list (−3 bytes). <details> <summary>Browser component captures</summary> **Before** — local archive choices. <img width="414" alt="Archive confirmation with local threads" src="https://github.com/user-attachments/assets/e9fae817-15b2-4449-b0e0-616db443f2f9" /> **After** — available, offline, and older machines in the same confirmation. <img width="414" alt="Archive confirmation with sections for linked machines" src="https://github.com/user-attachments/assets/d47a2c82-9fce-4083-9556-e6d450ead9bf" /> </details> ## Upstream-owned files touched | File | Added | Removed | | --- | ---: | ---: | | `apps/mobile/src/i18n/translations/de.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/en.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/es.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/fr.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/ja.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/ko.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/pt-BR.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/ru.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/sv.json` | 10 | 1 | | `apps/mobile/src/i18n/translations/zh.json` | 10 | 1 | | `apps/server/src/mcp/toolkits/thread/handlers.ts` | 7 | 4 | | `apps/server/src/mcp/toolkits/thread/tools.ts` | 1 | 1 | | `apps/server/src/peer/PeerLinks.test.ts` | 3 | 0 | | `apps/server/src/peer/PeerLinks.ts` | 9 | 3 | | `apps/server/src/provider/agentContextBudget.json` | 1 | 1 | | `apps/server/src/server.ts` | 7 | 0 | | `apps/server/src/ws.ts` | 8 | 0 | | `apps/web/src/i18n/translations/de.json` | 11 | 1 | | `apps/web/src/i18n/translations/en.json` | 11 | 1 | | `apps/web/src/i18n/translations/es.json` | 11 | 1 | | `apps/web/src/i18n/translations/fr.json` | 11 | 1 | | `apps/web/src/i18n/translations/ja.json` | 11 | 1 | | `apps/web/src/i18n/translations/ko.json` | 11 | 1 | | `apps/web/src/i18n/translations/pt-BR.json` | 11 | 1 | | `apps/web/src/i18n/translations/ru.json` | 11 | 1 | | `apps/web/src/i18n/translations/sv.json` | 11 | 1 | | `apps/web/src/i18n/translations/zh.json` | 11 | 1 | | `packages/contracts/src/index.ts` | 1 | 0 | | `packages/contracts/src/orchestrationV2.ts` | 2 | 0 | Local review: 8 rounds with gpt-6.1-terra (xhigh), approved. Carry-Source-Ref: refs/lastcode/carry-sources/pr-772/6b36558175043c85896f9bea8ffc88103ca567b9 Carry-Source-Base: 1aaf768 Carry-Source-Head: 6b36558
Part of #751
Agent guidance still described threads in older terms. In evals on main, the model delegated requests to start a child thread and made a group thread independent. It archived the wrap-up root before asking whether to include the typed-in conversations. The revised guidance uses the sidebar and lifecycle tool vocabulary and maps each short request to its operation.
Injected thread vocabulary
Stale guidance corrected
topLevel:true. The eval runner’s comments now call them launches.Model eval against main
GPT-6.1 Sol xhigh with the GPT-6.1 Terra shell simulator. Three samples per case per arm. Baseline
fba5fa4470e. The wrap-up pair uses the same revised fixture, with read results for the kept conversations. The vocabulary rows use the final model-facing text and were scored with the final grader. The wrap-up baseline uses the revised fixtures. The existing native-subagent guard uses the preceding candidate, which differs only by the default-placement clarification.The existing native-subagent guard failed all three samples on both main and the candidate. It is tracked in #589.
All 36 vocabulary samples and all three manual-placement control samples passed with the final grader. Both post-rebase samples passed, covering the explicit top-level flag and consent before archive. After reconciling #771, all 9 archive samples passed, including its temporary-project selection control. All 88 focused MCP and budget tests passed on the combined head.
The full tool-use run on
8f6dbba635f, before the review fixes, passed 600 of 649 scored samples across 317 cases. Three provider errors were unscored. The launch, grouping, promotion, and archive controls in that run passed. The ordinary new-thread guard passed 2 of 3, and the native-subagent guard also failed there. The paired main comparison covers the cases in the table. The full run has no matching full baseline.Quick CI and 668 focused tests passed across the final changes. Rebase validation covers the generated budget and carry compilation. Required GitHub CI and Codex review passed on the preceding head
ec0d25ef45c815e14fe30dd5abc3da7b135deb48, with zero unresolved review threads. GitHub CI, Codex review.Context budget
claudeSystemAppendBytescodexAdditionalContextBytesmcpToolListJsonBytesMain changed other tool descriptions after the focused run. At #771, the archive description kept both the new temporary-project consent and the vocabulary guidance. The measured byte increases are the same after rebasing.
The orchestrator applied
agent-context-increaseafter reviewing the previously approved head. The rebase after #771 preserves all three approved byte increases.Upstream-owned files
apps/server/src/mcp/McpHttpServer.test.tsapps/server/src/mcp/toolkits/orchestrator/tools.tsapps/server/src/mcp/toolkits/project/tools.tsapps/server/src/mcp/toolkits/thread/tools.tsapps/server/src/provider/agentContextBudget.jsondocs/user/thread-sidebar.mdevals/mcp-tool-use/run.tspackages/provider-core/src/server/orchestrationInstructions.tsDecisions
Local review: 3 rounds with GPT-6.1 Terra (xhigh), approved. The last round found one low-severity grader gap. The tighter check rejects unrelated questions and preserves the paired wrap-up scores when regrading saved samples.