the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Ensure files end with newline when written

Append a trailing newline to file contents across sandbox providers and
the
TTY file writer. Use echo -e (and adjust base64 echo) so the newline is
preserved when creating files.

+9 -7
+2 -2
apps/api/src/tty/index.tsx
··· 134 134 if (basePath !== "/" && basePath != ".") { 135 135 await mkdir(basePath); 136 136 } 137 - const encoded = Buffer.from(content, "utf8").toString("base64"); 137 + const encoded = Buffer.from(content + "\n", "utf8").toString("base64"); 138 138 await sprite.execFile("sh", [ 139 139 "-c", 140 - `echo '${encoded}' | base64 -d | tee ${absolutePath}`, 140 + `echo -e '${encoded}' | base64 -d | tee ${absolutePath}`, 141 141 ]); 142 142 }; 143 143
+3 -1
apps/cf-sandbox/src/providers/cloudflare/index.ts
··· 67 67 if (basePath !== "/" && basePath != ".") { 68 68 await this.sandbox.mkdir(basePath, { recursive: true }); 69 69 } 70 - await this.sandbox.writeFile(absolutePath, content, { encoding: "utf-8" }); 70 + await this.sandbox.writeFile(absolutePath, content + "\n", { 71 + encoding: "utf-8", 72 + }); 71 73 } 72 74 73 75 async setupSshKeys(privateKey: string, publicKey: string): Promise<void> {
+1 -1
apps/sandbox/src/providers/daytona/mod.ts
··· 56 56 if (basePath !== "/" && basePath != ".") { 57 57 await this.mkdir(basePath); 58 58 } 59 - await this.sh`echo '${content}' > ${absolutePath}`; 59 + await this.sh`echo -e '${content}\n' > ${absolutePath}`; 60 60 } 61 61 62 62 async setupSshKeys(privateKey: string, publicKey: string): Promise<void> {
+1 -1
apps/sandbox/src/providers/deno/mod.ts
··· 66 66 if (basePath !== "/" && basePath != ".") { 67 67 await this.mkdir(basePath); 68 68 } 69 - await this.sh`echo '${content}' > ${absolutePath}`; 69 + await this.sh`echo -e '${content}\n' > ${absolutePath}`; 70 70 } 71 71 72 72 async setupSshKeys(privateKey: string, publicKey: string): Promise<void> {
+1 -1
apps/sandbox/src/providers/sprites/mod.ts
··· 53 53 } 54 54 await this.sprite.execFile("sh", [ 55 55 "-c", 56 - `echo '${content}' > ${absolutePath}`, 56 + `echo -e '${content}\n' > ${absolutePath}`, 57 57 ]); 58 58 } 59 59
+1 -1
apps/sandbox/src/providers/vercel/mod.ts
··· 53 53 if (basePath !== "/" && basePath != ".") { 54 54 await this.mkdir(basePath); 55 55 } 56 - await this.sh`echo '${content}' > ${absolutePath}`; 56 + await this.sh`echo -e '${content}\n' > ${absolutePath}`; 57 57 } 58 58 59 59 async setupSshKeys(privateKey: string, publicKey: string): Promise<void> {