You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4c8692a
Browse filesBrowse the repository at this point in the historyBrowse files
* Added to an attempt's system prompt when its launch found the disk full:
243
+
* a Claude Code run that died of it is restarted mid-turn, before the next
244
+
* turn's note can tell it.
245
+
*/
246
+
constCLAUDE_CODE_DISK_FULL_NOTE=`dx note: this Orb's disk filled up completely during this turn, which stopped Claude Code. dx freed its own emergency space so it could restart. Before anything else, free regenerable space (build outputs and caches such as node_modules, target, dist, build, .cache, and package manager caches; find them with \`du -xh -d 2 ~ 2>/dev/null | sort -h | tail -n 20\`), never source files or uncommitted work, then continue the task.`;
247
+
229
248
/** Moves the plan token from the command's environment to descriptor 3. */
230
249
constTOKEN_TO_DESCRIPTOR=`# The plan token arrives in this command's environment, which every process
231
250
# of the workspace user can read through /proc while the process lives, and
@@ -276,7 +295,9 @@ const launchScript = (
276
295
.join(" ");
277
296
return`${TOKEN_TO_DESCRIPTOR}
278
297
set -eu
279
-
D=${quote(dir)}
298
+
# A full disk must not keep Claude Code from starting: the guard frees dx's
299
+
# reserve and leftovers first, and the agent is told to free space.
300
+
${workspaceDiskGuard(false)}D=${quote(dir)}
280
301
S=${quote(STATE_ROOT)}
281
302
mkdir -p "$D"
282
303
if [ -e "$D/pid" ]; then echo running; exit 0; fi
@@ -291,6 +312,7 @@ finish() {
291
312
}
292
313
trap finish EXIT
293
314
${files??`. "$D/${LAUNCH_FILES}"`}
315
+
if [ "$dx_disk_full" = 1 ]; then printf '\n\n%s\n' ${quote(CLAUDE_CODE_DISK_FULL_NOTE)} >> "$D/prompt.txt"; fi
294
316
# A recorded PID is killed only while it is still that run's runner: after a
295
317
# container restart the number can belong to any process.
0 commit comments