github / github/copilot-sdk

Feature Request: support fetching content from authenticated URLs supplied in a prompt

Open
#2,682 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
10.5k
Forks
1.5k
Avg merge
1d 11h
Merged PRs (30d)
127

Description

## Problem

Prompts routinely reference documents by link — a specification, a design file, a dashboard, an internal wiki page. When the link requires authentication, the session cannot retrieve it. Anonymous links work, but internal engineering documents generally cannot be made anonymous, so the agent silently loses the most relevant context.

The failure mode is also unclear: an authorization failure, a missing connector, and an unsupported content type are not distinguishable from one another in the result.

## What is missing

- No supported mechanism for the caller to grant the session credentialed access to a referenced URL.
- No extension point for the host application to resolve a link on the session's behalf and return its content.
- No differentiated error reporting for fetch failures.

## Proposed behavior

- The host application can register a content resolver, so links matching a configured pattern are fetched by the host, using the host's own authentication, and returned to the session as context resources.
- Alternatively, the caller can supply scoped credentials for a specific host or domain.
- Fetch results are reported per link: fetched, unauthorized, unsupported type, or not attempted.
- Credentials are never exposed in prompts, model context, or logs.

## Example scenario

A prompt links to an internal specification page. The host application recognizes the domain, retrieves the content with the requesting user's authorization, and passes it to the session as a document resource.

## Acceptance criteria

- A documented extension point exists for host-mediated link resolution.
- Resolved content becomes session context with attribution to its source link.
- Failures are distinguishable by cause and surfaced to the caller.

Contributor guide

Open the contributing guide

Research direction

Start by locating the SDK's session, context-resource, and host extension-point APIs described in the issue. Trace how referenced links and fetch failures are currently represented, then define the resolver contract, per-link outcomes, source attribution, and credential-handling behavior required by the acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Domain
api, authentication, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.