Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): allow long thread IDs in HTTP routes #8898

MergednateEc(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/8898/headmerged by juliusmarminge View on GitHub

Fixes #8860.

MCP handoff thread IDs can exceed the HTTP router default of 100 characters, causing valid thread snapshot requests to return a route-level 404.

Raise the server router parameter limit to 512 and cover an authenticated snapshot request for a representative MCP handoff ID.

Verification: focused server regression test and t3 server package typecheck.

Model and harness: GPT-5 Codex via Codex CLI.


Note

Low Risk Narrow routing configuration change with a bounded param length; no auth or data-model changes, covered by a new integration test.

Overview Raises the HTTP router path-parameter limit from find-my-way’s default (100) to 512 via a shared HTTP_ROUTER_CONFIG, wired into production HttpRouter.serve and the integration test harness so behavior matches.

This fixes 404s on authenticated thread snapshot requests when the :threadId segment is a long MCP handoff ID (escaped provenance in the path).

Adds a regression test that requests /api/orchestration/threads/... with a representative MCP handoff thread ID and asserts a 200 snapshot response.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c4c9188b0b5c6dd55a35dc674b2c19d7ce44e556. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Increase HttpRouter maxParamLength to 512 for MCP handoff thread IDs

MCP handoff thread IDs can exceed the router's default single-segment parameter length limit. Adds a new HTTP_ROUTER_CONFIG constant with maxParamLength set to 512 in server.ts and passes it to HttpRouter.serve in makeServerLayer. Adds a test verifying that a long thread ID resolves correctly on the /api/orchestration/threads/{id} route.

  • Behavioral Change: all single-segment path parameters on routes served by makeServerLayer now accept values up to 512 characters instead of the previous default.
Macroscope summarized c4c9188.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 857e5904-455e-4aea-8da3-27004896f6a0

      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

      Warning

      Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The PR is a focused routing bug fix with a representative authenticated regression test, but it changes the application-wide default maximum HTTP path-parameter length from 100 to 512. That product-default change warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged this41adccc

    5. juliusmarminge closed this

Sign in to join this conversation.