can1357/oh-my-pi · error
issue:// resolution failed: ${message}
Error message
issue:// resolution failed: ${message} What it means
Wrapper error thrown by IssueProtocolHandler.resolve (packages/coding-agent/src/internal-urls/issue-pr-protocol.ts:553) when getOrFetchIssue — the single-issue resolution path for issue://owner/repo/<n> — fails. The original error message is preserved after the `issue:// resolution failed:` prefix. This is the counterpart of the listing wrapper (1532) for a specific issue.
Source
Thrown at packages/coding-agent/src/internal-urls/issue-pr-protocol.ts:553
const lookup = await getOrFetchIssue({
cwd: resolveCwd(context),
repo: parsed.repo,
issue: String(parsed.number),
includeComments: parsed.comments,
signal: context?.signal,
settings: settingsFromContext(context),
});
return buildSingleResource({
url,
scheme: "issue",
parsed,
rendered: lookup.rendered,
status: lookup.status,
fetchedAt: lookup.fetchedAt,
});
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
throw new Error(`issue:// resolution failed: ${message}`);
}
}
}
/**
* Handler for `pr://` URLs.
*/
export class PrProtocolHandler implements ProtocolHandler {
readonly scheme = "pr";
readonly immutable = true;
async resolve(url: InternalUrl, context?: ResolveContext): Promise<InternalResource> {
if (context?.signal?.aborted) {
throw new Error("aborted");
}
const parsed = parseUrl(url, "pr");
if (parsed.kind === "list") {
try {View on GitHub (pinned to 9690622007)
Solutions
- Read the inner message after the `issue:// resolution failed: ` prefix — it names the real cause (404, auth, network).
- Verify the issue exists: `gh issue view <n> -R owner/repo` reproduces the fetch outside this library.
- Use the fully-qualified issue://owner/repo/<n> form to rule out default-repo resolution problems.
- Run `gh auth login` if the inner message indicates authentication or permission failure.
- If the cause is transient (network, rate limit), retry after a delay — immutable cached content may still resolve in the meantime.
Example fix
// before
const res = await handler.resolve(parse("issue://acme/widgets/42"));
// after
try {
const res = await handler.resolve(parse("issue://acme/widgets/42"));
} catch (err) {
const cause = String(err.message).replace("issue:// resolution failed: ", "");
if (/404|not found/i.test(cause)) console.error("Issue does not exist");
else throw err;
} Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the issue is reachable before resolving through the handler:
const check = await $`gh issue view ${n} -R ${owner}/${repo} --json number`.quiet().nothrow();
if (check.exitCode !== 0) throw new Error(`issue ${n} not accessible in ${owner}/${repo}`); Type guard
function isIssueResolutionFailure(err: unknown): err is Error {
return err instanceof Error && err.message.startsWith("issue:// resolution failed: ");
} Try / catch
try {
return await issueHandler.resolve(url, ctx);
} catch (err) {
if (err instanceof Error && err.message.startsWith("issue:// resolution failed: ")) {
const cause = err.message.slice("issue:// resolution failed: ".length);
if (/not found|404/i.test(cause)) return null; // permanently missing
if (/rate limit|timeout|network/i.test(cause)) return retryWithBackoff(() => issueHandler.resolve(url, ctx));
throw err;
}
throw err;
} Prevention
- Authenticate gh (`gh auth login`) and confirm access to the target repo beforehand.
- Use fully-qualified issue://owner/repo/<n> URLs to avoid default-repo ambiguity.
- Classify the inner cause: 404 = permanent, network/rate-limit = retryable.
- Check that the issue number is an integer before building the URL.
When it happens
Trigger: Resolving issue://owner/repo/<n> (or issue://<n>) when fetching that one issue fails: issue number does not exist, repo slug wrong or inaccessible, gh CLI unauthenticated, network error, rate limit, or default-repo resolution failing for the bare issue://<n> form.
Common situations: Typo in issue number or repo; private repo without gh auth; issue closed/deleted and cache expired forcing a live refresh that 404s; offline; GitHub API secondary rate limits.
Related errors
- issue:// listing failed: ${message}
- pr:// listing failed: ${message}
- pr:// resolution failed: ${message}
- pr:// diff resolution failed: ${message}
- assume-role
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/708d0f3cbe4a71a5.
Report an issue: GitHub.