Repository navigation
Conversation
The generic tail of prepareRunnerLogin returns a nil env map. The three providers currently in runnerLoginSpec never hit that tail (the codex and claude-code OAuth branches and the Antigravity branch each build their own maps), so PrepareRunnerAgentCLILogin has always assigned env["HOME"] on a non-nil map. Adding a login spec whose staged login flows through the generic path panics the runner daemon (assignment to entry in nil map), which surfaces as an expired lease on the platform. Guard with an empty map so env["HOME"] and env["TMPDIR"] land safely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PrepareRunnerAgentCLILoginassignsenv["HOME"]on the map returned byprepareRunnerLoginwithout a nil check. The generic tail ofprepareRunnerLoginreturnscleanup, nil, nil— only the codex/claude-code OAuth branches and the Antigravity branch build a non-nil env map. Today norunnerLoginSpecentry flows through the generic tail, so this is latent; adding one (e.g. a CLI whose account login is a single staged file without OAuth refresh) panics the runner daemon:From the platform side the failure surfaces as an expired task lease, which points investigation away from the real cause.
Fix
Initialize the env map when the staged login returns none, so
env["HOME"]/env["TMPDIR"]land safely on the generic path. No behavior change for codex, claude-code and antigravity.Verified on a self-hosted instance: a login spec routed through the generic path panics before the guard and runs cleanly after it.