LabscoMCP early access ↗
MCP SERVER · OFFICIAL PROJECT

Trunk Flaky Tests

Flaky-test answers inside your coding agent: look a test up, get its root cause and a suggested fix, or pull the logs from a failed CI run.

by Trunk ↗Automated Testing & QA✓ Official

LABSCO SUMMARY

The setup tool is there because the others are useless without data.

Flaky-test detection needs a history of runs, and the setup step — getting results uploaded from your CI — is where most teams stall. Shipping that as a tool means the agent can do the onboarding as well as the fixing, in the same conversation. On the analysis itself: root cause matters more than the fix suggestion, because flakiness is usually a shared-state or timing problem that a naive retry hides rather than solves. Read the cause before applying the patch.

What it is

Trunk detects flaky tests across CI runs. The endpoint hands that analysis to a coding agent instead of a dashboard.

What you get

  • search-test — look up the id of a test case (experimental)
  • fix-flaky-test — the root-cause analysis for a specific flaky test, with a suggested fix (experimental)
  • investigate-ci-failure — the failing test logs from a CI run (experimental)
  • setup-trunk-uploads — generate the plan for uploading your test results in the first place

Requirements

OAuth with OpenID Connect against your Trunk account, or your organisation's API token as a Bearer header for clients that cannot do OAuth. A single command adds it in Claude Code; other clients take the URL.

Setup effort

Paste a URL, then authorize — add the endpoint to your client, then approve the OAuth consent screen