@@ -339,7 +339,8 @@ describe('Workspace Deletion Workflow (Issue #288)', () => {
339339 * Test 6: New session can be created when /workspace doesn't exist
340340 *
341341 * This tests the core fix for issue #288: when a new session is created
342- * and /workspace doesn't exist, it should fall back to / instead of failing.
342+ * and /workspace doesn't exist, it should fall back to the home directory
343+ * instead of failing.
343344 *
344345 * Note: This test uses a different sandbox ID to ensure a completely new
345346 * session is created (not reusing an existing one).
@@ -377,7 +378,8 @@ describe('Workspace Deletion Workflow (Issue #288)', () => {
377378 * This is the PRIMARY test for issue #288. The bug was that creating a NEW session
378379 * after /workspace was deleted would fail with "Unknown Error, TODO".
379380 *
380- * The fix makes session initialization fall back to "/" if /workspace doesn't exist.
381+ * The fix makes session initialization fall back to the home directory if
382+ * /workspace doesn't exist.
381383 *
382384 * IMPORTANT: This test actually deletes /workspace and creates a new session.
383385 * It restores /workspace at the end to avoid breaking other tests.
@@ -450,7 +452,7 @@ describe('Workspace Deletion Workflow (Issue #288)', () => {
450452 ) ;
451453 expect ( newSessionData . stderr ?. toLowerCase ( ) || '' ) . not . toContain ( 'todo' ) ;
452454
453- // Step 5: Verify the new session fell back to "/" as working directory
455+ // Step 5: Verify the new session fell back to home directory
454456 const pwdResponse = await fetch ( `${ workerUrl } /api/execute` , {
455457 method : 'POST' ,
456458 headers : newHeaders ,
@@ -461,8 +463,8 @@ describe('Workspace Deletion Workflow (Issue #288)', () => {
461463 expect ( pwdResponse . status ) . toBe ( 200 ) ;
462464 const pwdData = ( await pwdResponse . json ( ) ) as ExecResult ;
463465 expect ( pwdData . success ) . toBe ( true ) ;
464- // Session should have fallen back to / since /workspace didn't exist
465- expect ( pwdData . stdout ?. trim ( ) ) . toBe ( '/' ) ;
466+ // Session should have fallen back to /root since /workspace didn't exist
467+ expect ( pwdData . stdout ?. trim ( ) ) . toBe ( '/root ' ) ;
466468
467469 // Step 6: Restore /workspace for other tests
468470 const restoreResponse = await fetch ( `${ workerUrl } /api/execute` , {
0 commit comments