Skip to content

[Bug] Make live-search artifact handoffs host-neutral and directly actionable #280

Description

@morluto

Description

github.search_threads correctly persists a durable, digest-bound artifact and returns a native MCP ResourceLink. Its accompanying text instruction nevertheless requires the caller to translate the handoff into a host-specific operation:

Ask the host to perform MCP `resources/read` with this server and the exact URI …; in Codex, call `read_mcp_resource`.

The resource is intentionally opaque and durable; that boundary should remain. The problem is that the public handoff is partly prose and names one host, rather than being directly actionable through a host-neutral protocol contract.

Steps to Reproduce

  1. Call github.search_threads with valid flat owner, repo, and query inputs.
  2. Receive a compact structured result plus a gitcontribute://artifact/github-thread-search/<digest> link.
  3. Observe the text instruction above before the link.

Expected Behavior

A successful durable-artifact result should let an MCP host or agent follow the exact resource handoff without reconstructing a host-specific call from prose. The ResourceLink and any typed follow-up should make the next action clear while preserving the exact opaque URI and offline resource-read boundary.

Actual Behavior

The server emits host-specific text, including in Codex, call read_mcp_resource, and the current contract tests require that wording. An agent must infer the host/server parameters for a generic resource-read operation despite already receiving a protocol-native link.

Root Cause

internal/mcpserver/resource_links.go creates every linked result with resourceReadInstruction, which hard-codes the Codex-specific guidance. linkedResource returns both that text and mcp.ResourceLink; TestDurableToolResultsIncludeSDKResourceLinks locks the prose in as required behavior. The durable artifact itself and resources/read routing are sound.

Expected Outcome

  • Keep resource URIs opaque, digest-bound, and available only through the existing offline resources/read plane.
  • Make the handoff protocol-native and host-neutral: a conforming host can follow the returned link, and any supplementary guidance does not require reconstructing a host-specific invocation.
  • If a structured next-action representation is needed, make it explicit and reusable for immediate artifact producers as well as job artifacts; this should complement, not duplicate, closed [Feature] Return machine-readable arguments and retry timing for job follow-ups #234.
  • Add an integration-level regression that verifies a live-search result can be followed to its exact artifact through the advertised resource mechanism.

Environment

Observed in a Codex MCP session on 2026-08-09. The server version was not captured.

Additional Context

This is not a request to inline large artifact payloads or weaken provenance. It is limited to the resource-handoff contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions