Repository navigation
feat(threads): mark agent-created group threads - #752
Conversation
Empty agent-launched threads have no stored role. Record their group marker, clear it on first use, and mark historical parents with current placement evidence. Carry-Group: incubator Carry-Fix: #751 Implemented-by: GPT-6.2 Sol in the Codex harness.
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. What shall we delve into next? 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". |
Show the agent icon before the title and italicize the name so users can identify group threads in the LastCode sidebar. Carry-Group: incubator Carry-Fix: #751 Carry-Observation: This uses the agent icon and translated badge behavior already replayed in Incubator. Implemented-by: GPT-6.2 Sol in the Codex harness.
Group creator warnings could interrupt the title prefix. Put warnings in trailing metadata and keep the bot icon with the title. Carry-Group: incubator Carry-Fix: #751 Carry-Observation: This uses the agent icon and translated badge behavior already replayed in Incubator. Implemented-by: GPT-6.2 Sol in the Codex harness.
Completing the original fixture run can start the queue before the fixture marks the admitted Pause complete. Write both completion events under the thread lock so the replay test reaches its admission assertions. Carry-Group: incubator Carry-Fix: #751 Implemented-by: GPT-6.2 Sol in the Codex harness.
6c8f2e5 to
25d08f8
Compare
|
@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". |
Emit the cleared thread snapshot after the first accepted use and after all other command metadata is planned. Server and client reducers can apply the existing metadata event. Carry-Group: incubator Carry-Fix: #751 Implemented-by: GPT-6.2 Sol in the Codex harness.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! 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
Problem
An agent can create a thread only to hold other threads. Nothing records that role, so clients can't tell a group container from another empty thread.
Change
New optional
groupThread: trueon the persistedAppThreadJSON. It is absent for ordinary threads. It appears in the shell and int3_thread_listandt3_thread_read.The server sets it for
t3_thread_launchwith no message or attachments and forcreate_threadswith no prompt. Delegated task preparations, native imports, and user-created threads receive ordinary thread records.The first accepted run or standalone conversation message clears the flag. It stays cleared if the run later stops or fails. The server emits the cleared thread in an ordinary metadata event in the same transaction, after the command’s other metadata updates. The first-use rule lives in the fork-owned
planGroupThreadUse.ts.The historical backfill writes a durable event at startup. It requires an agent-created MCP thread that is non-deleted, has ordinary lineage, and has no runs, messages, delegation, imported history, or active provider thread. It also requires at least one currently placed, non-deleted child in the same project. The marker gives follow-up work a way to find the group while existing placement and archive behavior continue to follow their current rules.
The LastCode web and desktop sidebar shows the existing agent bot icon before an italic title. This PR limits the visual treatment to that sidebar. The Inbox and mobile clients receive the compatible contract. The feature is provider-independent and uses the existing projections for connected clients. It adds no translated strings.
Verification
Implemented with GPT-6.2 Sol in the Codex harness.
Local review: 3 rounds with GPT-6.1 Terra (xhigh), approved. The third round reviewed the command-based lifecycle revision.
Upstream-owned files
Files present in
origin/main. Counts are relative to the PR base.apps/server/src/mcp/OrchestratorMcpService.tsapps/server/src/mcp/toolkits/project/handlers.test.tsapps/server/src/mcp/toolkits/project/handlers.tsapps/server/src/orchestration-v2/Orchestrator.tsapps/server/src/orchestration-v2/ProjectionMaintenance.tsapps/server/src/orchestration-v2/ProjectionStore.tsapps/server/src/orchestration-v2/ThreadLaunchService.test.tsapps/server/src/orchestration-v2/ThreadLaunchService.tsapps/server/src/orchestration-v2/ThreadManagementService.tsapps/server/src/relay/AgentAwarenessRelay.tsapps/server/src/serverRuntimeStartup.tspackages/client-runtime/src/state/models.tspackages/client-runtime/src/state/orchestrationV2Projection.tspackages/contracts/src/orchestrationV2.tspackages/contracts/src/orchestratorMcp.tsSidebar captures
Before
After