#10249·jj

jj run "failed to checkout commit"

Author: senekorCreated Sep 22, 2026Updated Sep 28, 2026

Description

I wanted to take jj run for a spin to rename a file across several revisions that modify it. (To compensate for the lack of copy-tracking.) The command I ran was jj run -r q:: mv readme.md README.md. I got the error "failed to checkout the commit "

I narrowed the error source down to cli/src/commands/run.rs:279, which currently ignores the inner error:

rust
tree_state
    .check_out(&commit.tree())
    .map_err(|_| RunError::FailedCheckout(commit.id().clone()))?;

I debug-printed the inner error and got the following output:

[cli/src/commands/run.rs:280:13] e = Other {
    message: "Failed to stat /tmp/p/tmp.ZUOcarGsyV/playground/.jj/run/default/1/working_copy/readme.md",
    err: Os {
        code: 2,
        kind: NotFound,
        message: "No such file or directory",
    },
}

So, I'm guessing there is a problem with how the temporary working copy is populated or something...? Note that the error only occurs if the command actually reads from the file. Replacing mv with echo won't trigger the error. Also, other commands that fail like -- bash -c 'exit 1' give a different, expected error message. So, there is something special about the command reading from a file.

I might investigate more later if I find time, but I thought this would already be good to document.

Specifications

  • Platform: Fedora Linux
  • Version: 44