Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
On OpenClaw 2026.5.27, openclaw doctor --fix run in an environment where ~/.bashrc is
read-only (root-owned, mode 444) completes every doctor check green, then throws
Error: Failed to install completion: EACCES: permission denied, open '/sandbox/.bashrc'
and exits 1; reproduced deterministically on two machines.
Steps to reproduce
- Install OpenClaw and use a user account whose
~/.bashrc has no openclaw
completion line yet.
- Make the rc file read-only:
chmod 444 ~/.bashrc
(equivalently: any environment where ~/.bashrc is root-owned mode 444 — this is
how NVIDIA NemoClaw sandboxes ship by design, where the bug was found).
- Run:
openclaw doctor --fix; echo "exit:$?"
- Observe all doctor sections complete, then the trailing
Error: Failed to install completion: EACCES … and exit:1.
(Restore afterwards: chmod 644 ~/.bashrc.)
Expected behavior
Doctor treats shell-completion install as optional: on an unwritable rc file it prints a
one-line warning (e.g. "Shell completion not installed: ~/.bashrc is not writable — run
openclaw completion install against a writable rc file") and exits 0, consistent with
how other doctor sub-steps degrade to notes. doctor --fix --non-interactive already
skips this step entirely, so a hard failure on bare --fix is inconsistent.
Actual behavior
All doctor sections complete (config cleanup, skills, plugins, state integrity,
HEARTBEAT template repair), then:
Error: Failed to install completion: EACCES: permission denied, open '/sandbox/.bashrc'
and the process exits 1. No "Shell completion" note or prompt is shown before the error.
Full log in the Logs section.
OpenClaw version
2026.5.27 (27ae826)
Operating system
Ubuntu 24.04 inside a Docker container (NVIDIA NemoClaw sandbox); hosts: DGX Spark (aarch64, Linux 6.17.0-1014-nvidia) and a B300 server — identical result on both.
Install method
npm global, inside the Docker sandbox image (NVIDIA NemoClaw)
Model
N/A — bug is in the doctor CLI path; no model/inference involved.
Provider / routing chain
N/A — no request is made; failure is a local filesystem write in the completion installer.
Additional provider/model setup details
N/A
Logs
$ ls -la /sandbox/.bashrc
-r--r--r-- 1 root root 30 Jul 2 17:03 /sandbox/.bashrc
$ cat /sandbox/.bashrc
# NemoClaw sandbox shell init
$ openclaw doctor --fix; echo "doctor_exit:$?"
[... all sections green: Config warnings, Doctor changes, Command owner, Plugin
registry, State integrity, Security, Skills status (Eligible: 15), Plugins
(Loaded: 57, Errors: 0), HEARTBEAT template replaced ...]
Error: Failed to install completion: EACCES: permission denied, open '/sandbox/.bashrc'
doctor_exit:1
Screenshots, recordings, and evidence
N/A — text logs above.
Impact and severity
- Affected: anyone running
openclaw doctor --fix where the shell rc file is not
writable. Observed across all NVIDIA NemoClaw sandboxes, which intentionally lock
~/.bashrc to root:444 as security hardening (rc-file persistence prevention) —
making the file writable is not an option there.
- Severity: doctor's exit code becomes unusable as a health signal in these
environments; routine maintenance reports failure while every check actually passed.
- Frequency: deterministic — 100% of
doctor --fix runs in such an environment
(multiple runs, two machines).
- Consequence: CI/automation flags healthy sandboxes as broken; users debug a
non-existent problem.
Additional information
Found via NVIDIA/NemoClaw#6048. Not claiming a regression — older versions not tested.
Code path (read at commit be94853; function names should be stable):
--fix auto-approves every doctor confirm without rendering it
(shouldAutoApproveDoctorFix, src/commands/doctor-prompter.ts), so
doctorShellCompletion (src/commands/doctor-completion.ts) proceeds into the
"Enable shell completion?" path unprompted — this also explains why no prompt or
"Shell completion" note appears in the output (installCompletion is called with
yes=true, which suppresses its logging).
installCompletion (src/cli/completion-runtime.ts) hits EACCES writing the
profile and throws Failed to install completion: ….
- The doctor caller
runShellCompletionHealth
(src/flows/doctor-health-contributions.ts) has no try/catch, so the error
escapes the pipeline and sets exit 1.
Suggested fix: wrap the completion step in try/catch and downgrade to a "Shell
completion" warning note; optionally pre-check writability
(fs.access(profilePath, W_OK)) and skip with the same note.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
On OpenClaw 2026.5.27,
openclaw doctor --fixrun in an environment where ~/.bashrc isread-only (root-owned, mode 444) completes every doctor check green, then throws
Error: Failed to install completion: EACCES: permission denied, open '/sandbox/.bashrc'and exits 1; reproduced deterministically on two machines.
Steps to reproduce
~/.bashrchas no openclawcompletion line yet.
chmod 444 ~/.bashrc(equivalently: any environment where
~/.bashrcis root-owned mode 444 — this ishow NVIDIA NemoClaw sandboxes ship by design, where the bug was found).
openclaw doctor --fix; echo "exit:$?"Error: Failed to install completion: EACCES …andexit:1.(Restore afterwards:
chmod 644 ~/.bashrc.)Expected behavior
Doctor treats shell-completion install as optional: on an unwritable rc file it prints a
one-line warning (e.g. "Shell completion not installed: ~/.bashrc is not writable — run
openclaw completion installagainst a writable rc file") and exits 0, consistent withhow other doctor sub-steps degrade to notes.
doctor --fix --non-interactivealreadyskips this step entirely, so a hard failure on bare
--fixis inconsistent.Actual behavior
All doctor sections complete (config cleanup, skills, plugins, state integrity,
HEARTBEAT template repair), then:
Error: Failed to install completion: EACCES: permission denied, open '/sandbox/.bashrc'
and the process exits 1. No "Shell completion" note or prompt is shown before the error.
Full log in the Logs section.
OpenClaw version
2026.5.27 (27ae826)
Operating system
Ubuntu 24.04 inside a Docker container (NVIDIA NemoClaw sandbox); hosts: DGX Spark (aarch64, Linux 6.17.0-1014-nvidia) and a B300 server — identical result on both.
Install method
npm global, inside the Docker sandbox image (NVIDIA NemoClaw)
Model
N/A — bug is in the
doctorCLI path; no model/inference involved.Provider / routing chain
N/A — no request is made; failure is a local filesystem write in the completion installer.
Additional provider/model setup details
N/A
Logs
Screenshots, recordings, and evidence
N/A — text logs above.
Impact and severity
openclaw doctor --fixwhere the shell rc file is notwritable. Observed across all NVIDIA NemoClaw sandboxes, which intentionally lock
~/.bashrc to root:444 as security hardening (rc-file persistence prevention) —
making the file writable is not an option there.
environments; routine maintenance reports failure while every check actually passed.
doctor --fixruns in such an environment(multiple runs, two machines).
non-existent problem.
Additional information
Found via NVIDIA/NemoClaw#6048. Not claiming a regression — older versions not tested.
Code path (read at commit be94853; function names should be stable):
--fixauto-approves every doctor confirm without rendering it(
shouldAutoApproveDoctorFix,src/commands/doctor-prompter.ts), sodoctorShellCompletion(src/commands/doctor-completion.ts) proceeds into the"Enable shell completion?" path unprompted — this also explains why no prompt or
"Shell completion" note appears in the output (
installCompletionis called withyes=true, which suppresses its logging).installCompletion(src/cli/completion-runtime.ts) hits EACCES writing theprofile and throws
Failed to install completion: ….runShellCompletionHealth(
src/flows/doctor-health-contributions.ts) has no try/catch, so the errorescapes the pipeline and sets exit 1.
Suggested fix: wrap the completion step in try/catch and downgrade to a "Shell
completion" warning note; optionally pre-check writability
(
fs.access(profilePath, W_OK)) and skip with the same note.