paperclipai/paperclip · error
Daytona syncOut refusing unparseable hardlink entry: ${line}
Error message
Daytona syncOut refusing unparseable hardlink entry: ${line} What it means
Thrown by assertTarballEntriesConfined when a hardlink entry in a sandbox-authored tar archive cannot be parsed. The function parses GNU `tar -tvf` verbose output and expects hardlink members (typeFlag 'h') to contain the literal substring ' link to ' separating the link name from its target. This guard exists because the tar is produced by an untrusted sandbox and any unparseable entry fails closed to prevent path-traversal during host-side extraction.
Source
Thrown at packages/plugins/sandbox-providers/daytona/src/file-sync.ts:215
});
const lines = stdout.split("\n").filter((line) => line.trim().length > 0);
for (const line of lines) {
// GNU tar -tvf: "<perms> <owner>/<group> <size> <date> <time> <name>[ -> target]".
const match = line.match(/^(\S+)\s+\S+\s+\d+\s+\S+\s+\S+\s+(.*)$/);
if (!match) {
throw new Error(`Daytona syncOut refusing tarball with an unparseable entry listing: ${line}`);
}
const typeFlag = match[1][0];
let name = match[2];
let linkTarget: string | null = null;
if (typeFlag === "l") {
const idx = name.indexOf(" -> ");
if (idx === -1) throw new Error(`Daytona syncOut refusing unparseable symlink entry: ${line}`);
linkTarget = name.slice(idx + " -> ".length);
name = name.slice(0, idx);
} else if (typeFlag === "h") {
const idx = name.indexOf(" link to ");
if (idx === -1) throw new Error(`Daytona syncOut refusing unparseable hardlink entry: ${line}`);
linkTarget = name.slice(idx + " link to ".length);
name = name.slice(0, idx);
}
const cleanName = name.replace(/\/+$/, "");
if (cleanName.length > 0 && posixPathEscapes(cleanName)) {
throw new Error(`Daytona syncOut refusing tarball member that escapes the extraction dir: ${name}`);
}
if (linkTarget !== null) {
const resolved = path.posix.join(path.posix.dirname(cleanName), linkTarget);
if (path.posix.isAbsolute(linkTarget) || posixPathEscapes(resolved)) {
throw new Error(
`Daytona syncOut refusing tarball link whose target escapes the extraction dir: ${name} -> ${linkTarget}`,
);
}
}
}
}
View on GitHub (pinned to 67001ec6eb)
Solutions
- Ensure the sandbox image provides GNU tar so `tar -tvf` emits the standard '<name> link to <target>' hardlink format.
- Re-run the syncOut operation to regenerate the tarball in case of transient corruption.
- Inspect the offending `line` value in the error message to identify which tar binary/format produced it and adjust the sandbox image accordingly.
- Avoid placing hardlinks in the synced source directory if the sandbox tar cannot be standardized.
Example fix
// before: sandbox ships BSD tar producing 'hardlink' wording // after: install GNU tar in the sandbox image Dockerfile RUN apt-get update && apt-get install -y tar
Defensive patterns
Strategy: validation
Validate before calling
function isGnuTarHardlinkLine(line: string): boolean {
// typeFlag 'h' must carry ' link to ' separator after the name
const m = line.match(/^(\S+)\s+\S+\s+\d+\s+\S+\s+\S+\s+(.*)$/);
if (!m) return false;
if (m[1][0] !== 'h') return true;
return m[2].includes(' link to ');
} Try / catch
try {
await extractHostTarball({ archivePath, localDir });
} catch (e) {
if (e instanceof Error && e.message.includes('unparseable hardlink entry')) {
// sandbox tar format unsupported; rebuild archive with GNU tar
}
throw e;
} Prevention
- Standardize the sandbox image on GNU tar so hardlink listings always use ' link to '.
- Avoid hardlinks in synced source trees when the sandbox tar format is not guaranteed.
- Pre-validate the tar listing format in the sandbox before transfer.
When it happens
Trigger: A syncOut directory download produces a tarball where a hardlink line in `tar -tvf` output does not match the expected '<perms> ... <name> link to <target>' format, or the ' link to ' separator is missing. Also triggered if the sandbox tar binary emits a non-GNU verbose format (e.g. BSD tar) for hardlinks.
Common situations: The sandbox image uses a non-GNU tar (BSD/detect-tar) that formats hardlinks differently; a corrupted tarball from a partially-written sync; a tar version that localizes or alters the ' link to ' wording; locale settings changing tar's output format.
Related errors
- Daytona syncOut refusing tarball member that escapes the ext
- Daytona syncOut refusing tarball link whose target escapes t
- Daytona syncOut refusing tarball with an unparseable entry l
- Daytona syncOut refusing unparseable symlink entry: ${line}
- Daytona sync ${label} path is not a confined absolute path:
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/0b30f4553a4cd1a3.
Report an issue: GitHub.