can1357/oh-my-pi · error
Artifact ${artifact.id} is ${artifact.size} bytes; full inte
Error message
Artifact ${artifact.id} is ${artifact.size} bytes; full internal resolution is blocked. Use read selectors such as artifact://${artifact.id}:1-3000 or artifact://${artifact.id}:raw:1-3000, and use the artifact file path for search/copy workflows: ${artifact.path} What it means
Full-text resolution of an artifact through artifact:// is capped at MAX_INLINE_ARTIFACT_BYTES. Larger artifacts are refused so a single read doesn't dump megabytes of tool output into the model context; the error tells you to use line/range selectors or the on-disk path for bulk operations.
Source
Thrown at packages/coding-agent/src/internal-urls/artifact-protocol.ts:119
async resolve(url: InternalUrl, context?: ResolveContext): Promise<InternalResource> {
const artifact = await resolveArtifactFile(url, context);
// Path-only callers (search/grep, bash URL expansion) never touch the
// artifact bytes. Return the resource shape so those flows keep working
// on artifacts of any size — only content materialization is gated.
if (context?.pathOnly) {
return {
url: url.href,
content: "",
contentType: "text/plain",
size: artifact.size,
sourcePath: artifact.path,
};
}
if (artifact.size > MAX_INLINE_ARTIFACT_BYTES) {
throw new Error(
`Artifact ${artifact.id} is ${artifact.size} bytes; full internal resolution is blocked. Use read selectors such as artifact://${artifact.id}:1-3000 or artifact://${artifact.id}:raw:1-3000, and use the artifact file path for search/copy workflows: ${artifact.path}`,
);
}
const content = await Bun.file(artifact.path).text();
return {
url: url.href,
content,
contentType: "text/plain",
size: artifact.size,
sourcePath: artifact.path,
};
}
async complete(): Promise<UrlCompletion[]> {
const ids = new Set<string>();
for (const dir of artifactsDirsFromRegistry()) {
let files: string[];View on GitHub (pinned to 9690622007)
Solutions
- Read a slice with a selector: artifact://<id>:1-3000
- Use raw byte ranges: artifact://<id>:raw:1-3000
- For search/copy/paging workflows, operate on artifact.path directly with grep/read tools
- Iterate ranges (1-3000, 3001-6000, ...) if you truly need the whole content
Example fix
// before
const all = await resolve('artifact://17')
// after
const first = await resolve('artifact://17:1-3000')
const rest = await resolve('artifact://17:raw:3001-6000') Defensive patterns
Strategy: validation
Validate before calling
const MAX = 256 * 1024 // match MAX_INLINE_ARTIFACT_BYTES
const size = (await Bun.file(artifactPath).stat()).size
const url = size > MAX ? `artifact://${id}:1-3000` : `artifact://${id}` Try / catch
try {
return await resolve(`artifact://${id}`)
} catch (err) {
if (String(err).includes('full internal resolution is blocked')) {
return resolve(`artifact://${id}:1-3000`)
}
throw err
} Prevention
- Always prefer range selectors (artifact://id:1-3000) for unknown-size artifacts
- Use the artifact file path with grep/head for bulk inspection
- Never resolve full artifacts inline into model context without checking size
When it happens
Trigger: Calling artifact://<id> (no selector) or a selector that resolves the full body when the artifact's stat().size exceeds MAX_INLINE_ARTIFACT_BYTES.
Common situations: Reading a large build log, test output, or generated dump artifact in full; agent tried to ingest a big command-output artifact wholesale instead of slicing it.
Related errors
- Managed skill is ${bytes} bytes; the limit is ${MAX_MANAGED_
- Session too large to share: ${sealed.byteLength} bytes seale
- Artifact ${id} not found. Available: ${availableStr}
- Artifact ${id} resolved to a directory, not a file
- ${name} exceeds the ${SHARPSHOOTER_MAX_FILE_LINES}-line limi
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/52ebcb9c40d1caaf.
Report an issue: GitHub.