Git LFS fails to run correctly
Open 💬 4 comments Opened Mar 30, 2026 by alexaka1
What issue are you seeing?
GIT LFS does not work in Codex Web. LFS files are not checked out before setup scripts. During setup scripts LFS is not configured, so I can't even pull the files there. During the model run with internet access LFS files still cannot be pulled.
What steps can reproduce the bug?
add this to you setup script in a repo that has LFS files.
has_lfs_endpoint() {
local endpoint
endpoint="$(git lfs env 2>/dev/null | awk -F': ' '/Endpoint/{print $2; exit}')"
[ -n "$endpoint" ] && printf '%s' "$endpoint" | grep -Eq '^[a-zA-Z][a-zA-Z0-9+.-]*://'
}
if [ -f .gitattributes ] && grep -q "filter=lfs" .gitattributes && command -v git-lfs >/dev/null 2>&1; then
log 'Enable Git LFS support'
git lfs install --local
if has_lfs_endpoint; then
log 'Refresh Git LFS content'
git lfs pull
else
log 'Skipping Git LFS content refresh (no LFS endpoint configured in this session)'
fi
fi
This results in Skipping Git LFS content refresh (no LFS endpoint configured in this session).
What is the expected behavior?
Git LFS should work as this means any repo that relies on LFS files completely fails to work in Codex Web.
Additional information
- Closed issue due to inactivity: https://github.com/openai/codex/issues/6135
- The repo in question is a private github repo, that is authed through the Codex GitHub app.
4 Comments
It looks like Codex is setting an empty Git
remote.origin.url. I use a custom setup script to set the URL like this:In the setup logs I see that the URL is empty:
After setting
remote.origin.urlI am able to pull LFS objects.Environment details:
@br3ndonland Do you use a public repo? I am using a private repo that is authed with the Codex (GitHub) app, and my setup script is the same as yours, I just added a bunch of debug assertions to confirm the issue.
@alexaka1 yes I'm using a public repo. I did some more testing, and I realized it was only working properly if I edited the environment and clicked "Connect interactive terminal." There, I can just run
git lfs pulland it works fine.<img width="75%" alt="Screenshot of editing a Codex Web cloud environment" src="https://github.com/user-attachments/assets/3d3cda49-0742-4745-9890-d033ec27f297" />
When I launch a cloud task though, the problem is that Codex is setting an empty Git
remote.origin.url. If I rungit config remote.origin.url https://github.com/org/repo.gitthen I can pull LFS objects.<img width="75%" alt="Screenshot of Codex Web cloud task missing remote.origin.url" src="https://github.com/user-attachments/assets/644435c3-e24b-4cac-8cae-2e99303b01e9" />
I updated my previous comment with this info.
I checked and this does not work with private repos. Git tries to HTTPS auth with username PAT combo. Which obviously fails and I refuse to set it up.