Skip to content

feat(mcp): expose thread settlement in t3_thread_list and t3_thread_read - #13489

Merged
shivamhwp merged 2 commits into
pingdotgg:t3code/codex-turn-mappingfrom
SunkenInTime:t3code/mcp-thread-settled
Sep 27, 2026
Merged

shivamhwp merged 2 commits into
pingdotgg:t3code/codex-turn-mappingfrom
SunkenInTime:t3code/mcp-thread-settled

Conversation

@SunkenInTime

Copy link
Copy Markdown
Contributor

What Changed

  • t3_thread_list items and t3_thread_read's thread detail now include settled: boolean and settledAt: string | null.
  • t3_thread_list accepts an optional settled filter: true returns only settled threads, false returns only active ones.
  • "Settled" means settledOverride === "settled", the same check the sidebar uses. Manual settles and auto-settles (PR merged, inactivity) both count. settledAt is null whenever the thread is not settled.

4 files, about +66 lines, most of them the test.

Why

Orchestrator V2 settles threads out of the active list, but the orchestrator MCP didn't expose that state. An agent that listed or read threads couldn't tell a settled thread from an active one. Passing settled to t3_thread_list was silently ignored, so the agent got every thread back.

The data was already on OrchestrationV2ThreadShell and the thread projection. This change maps it through the two existing tools. There's no new tool and no change to the projection.

Reproduction

  1. Start a dev instance on t3code/codex-turn-mapping. Create a thread, let it finish, and settle it from the sidebar menu.
  2. In a new thread, ask the agent to call t3_thread_list, then t3_thread_list({settled: true}), then t3_thread_read on the settled thread.
  3. Expected: the settled thread reports settled: true, and the filter returns only that thread.
    Actual: neither tool returns a settled field, and settled: true returns all 4 threads.

Verification

  • New assertions in OrchestratorMcpToolkit.integration.test.ts. The test settles a thread and checks settled/settledAt on both tools and both filter values. It failed before the fix (missing settled) and passes after.
  • End to end in a dev instance with a Codex (GPT-6-Astra) agent calling the real MCP tools. I sent the same prompt before and after the fix, with the same settled thread (PONG).

UI Changes

This PR doesn't change the UI. The screenshots show what the agent reports from the MCP tools.

Before: settled fields are missing and settled: true doesn't filter.

before

After: PONG reports settled: true with its settledAt, and settled: true returns only PONG.

after

Notes

Local checks on Windows that are unrelated to this diff:

  • vp lint fails to parse vite.config.ts (excludeFiles is unknown to the installed vp 0.3.3), so CI's vp check covers lint.
  • vp fmt --check passes on the changed files. Typecheck reports no errors in them.
  • In the same test file, reports running and queued child follow-ups from a Codex replay transcript fails on Windows with a C:\C:\… fixture path. It fails the same way without this change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (n/a)

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 24, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 89f9846

Macroscope's review found this PR approvable — Adds settlement metadata and an opt-in settled-state filter to existing MCP thread list/read responses, with unchanged default behavior and integration coverage for settled and active cases. No product defaults, deployment behavior, or static-analysis settings are changed.

No code changes detected at 227a7eb. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@SunkenInTime
SunkenInTime force-pushed the t3code/mcp-thread-settled branch from 89f9846 to b5506ab Compare September 24, 2026 20:48
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 3 times, most recently from fe4f6ad to 87c67bd Compare September 25, 2026 05:55
Agents could not tell settled threads from active ones. List items and
thread detail now carry `settled` and `settledAt`, and t3_thread_list
accepts a `settled` filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SunkenInTime
SunkenInTime force-pushed the t3code/mcp-thread-settled branch from b5506ab to 227a7eb Compare September 25, 2026 13:08
@shivamhwp
shivamhwp merged commit 402205e into pingdotgg:t3code/codex-turn-mapping Sep 27, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants