diff --git a/src/agents/shell-snapshot.ts b/src/agents/shell-snapshot.ts index 874f559a4a3..c47ea101a5a 100644 --- a/src/agents/shell-snapshot.ts +++ b/src/agents/shell-snapshot.ts @@ -249,9 +249,7 @@ async function validateSnapshot( async function captureShellSnapshot(opts: ShellSnapshotWrapOptions): Promise { const shellName = path.basename(opts.shell); - const captureOutputDir = await fs.mkdtemp( - path.join(os.tmpdir(), `openclaw-shell-snapshot-${process.pid}-`), - ); + const captureOutputDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-shell-snapshot-")); await fs.chmod(captureOutputDir, 0o700); const captureOutputPath = path.join(captureOutputDir, "snapshot.out"); const captureOutputFile = await fs.open(captureOutputPath, "wx", 0o600);