xai-org/grok-build · error
The change was applied, but Doctor could not verify `{}` in
Error message
The change was applied, but Doctor could not verify `{}` in persistent configuration. What it means
When the fix outcome is not directly reflected in the doctor report, `apply_fix_plan` falls back to `crate::diagnostics::verify_persistent_fix(&outcome)`, which checks the change landed in persistent configuration. If that verification returns false, the command bails: the fix was applied but could not be confirmed in durable config, so success cannot be claimed.
Source
Thrown at crates/codegen/xai-grok-pager/src/doctor_cmd/mod.rs:181
if outcome.activation() == FixActivation::SatisfiedNow {
// Use the shell stored on the outcome (from planning), not `$SHELL`.
// `$SHELL` may be missing or no longer match the shell the plan targeted.
let post_report = crate::diagnostics::configured_report(
collect_report_with(crate::diagnostics::probes::collect_standalone(terminal)),
outcome.managed_alias_is_configured(),
);
if post_report
.findings
.iter()
.any(|finding| finding.id == outcome.id())
{
anyhow::bail!(
"The change was applied, but Doctor still reports `{}`.",
outcome.id()
);
}
} else if !crate::diagnostics::verify_persistent_fix(&outcome) {
anyhow::bail!(
"The change was applied, but Doctor could not verify `{}` in persistent configuration.",
outcome.id()
);
}
writeln!(
writer,
"\n{}",
crate::diagnostics::format_fix_success(&outcome)
)?;
Ok(())
}
fn write_fix_preview(plan: &FixPlan, writer: &mut impl Write) -> std::io::Result<()> {
write!(writer, "{}", crate::diagnostics::format_fix_preview(plan))
}
fn shell_home_and_kind() -> Option<(std::path::PathBuf, ShellKind)> {View on GitHub (pinned to bc7f02eddd)
Solutions
- Check where the fix wrote its change and confirm that file persists (not inside a container/tmpfs layer).
- Verify the config path permissions allow writing and that the loader reads the same file.
- Manually set the setting in your persistent user/project config file.
- Re-run the doctor fix in the environment whose persistent config you intend to change.
Example fix
// before: fix writes to ephemeral env-only state // after: ensure the fix persists, e.g. correct HOME/config path echo $HOME && grok doctor fix-config --yes && cat ~/.grok/config.toml
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the target config file is writable and persistent before fixing
let path = persistent_config_path()?;
if !path.starts_with(home_dir()?) {
eprintln!("Config path {path:?} may be ephemeral; fixes may not persist.");
} Try / catch
if let Err(e) = doctor_fix(args) {
if e.to_string().contains("could not verify") {
eprintln!("{e}\nSet the option manually in your persistent config and re-run doctor.");
} else { return Err(e); }
} Prevention
- Run doctor in the same environment/user whose persistent config you want changed
- Ensure config directories are writable and not tmpfs/container-ephemeral
- Verify with `cat` on the config file after fixes that persistence matters
When it happens
Trigger: `apply_fix_plan` with a fix outcome that no longer appears in `post_report.findings` but for which `verify_persistent_fix` returns false — e.g. the change only took effect transiently (env/process state) and was not persisted, reached via `run_fix` and its tests.
Common situations: Config file written to a non-persistent location (temp profile, container layer) or unwritable config path; fix applied to runtime state only; config loader reading a different file than the one the fix wrote.
Related errors
- The change was applied, but Doctor still reports `{}`.
- resources state has no parent directory
- Error: Session ID {session_id} is already in use.
- Session does not exist locally (session registry is disabled
- Doctor fixes require interactive input and output.
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/5657542670cecf6a.
Report an issue: GitHub.