Skip to content

[Bug]: CLI crashes when current working directory is deleted (uv_cwd error not handled) #73676

Description

@oldsix-cell

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

CLI exits with uv_cwd error when the current working directory is deleted, without handling or fallback.

Steps to reproduce

  1. Create and enter a directory:
    mkdir test-dir
    cd test-dir

  2. Delete the directory:
    rm -rf ../test-dir

  3. Run:
    openclaw tui

  4. Observe error

Expected behavior

CLI should handle missing working directory and provide a clear error or fallback.

Actual behavior

CLI exits with:

Error: ENOENT: no such file or directory, uv_cwd

OpenClaw version

2026.4.24

Operating system

macOS 15.4

Install method

npm global

Model

NOT_RELEVANT

Provider / routing chain

NOT_RELEVANT

Additional provider/model setup details

NOT_RELEVANT

Logs, screenshots, and evidence

Error output:

Error: ENOENT: no such file or directory, uv_cwd

Impact and severity

Affected: CLI users
Severity: Medium (command cannot run)
Frequency: Reproducible when cwd is removed
Consequence: Requires manual recovery (cd to another directory)

Additional information

This behavior also occurs with npm commands in the same environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions