You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lk app create: mixed Unix/Windows path (/tmp\...) causes post_create task to fail silently on Windows #911
On Windows 11, lk app create completes and reports success, but a scaffolding task fails:
coreutils: open /tmp\2013691747: The system cannot find the path specified.
task: Failed to run task "post_create": task: Failed to run task
"set_agent_name_if_present": coreutils: open /tmp\2013691747: The system cannot find
the path specified.
The path /tmp\2013691747 mixes a Unix root (/tmp) with a Windows separator (\). That path cannot resolve on either OS.
The consequence is that set_agent_name_if_present does not run — yet the command still prints "Your agent has been created!" immediately above the error. Part of the scaffolding silently did not happen.
I believe this is also the cause of #910, where the console URL is emitted with an unpopulated project ID (projects/p_/).
Related symptom — likely the same root cause
Every lk invocation on Windows also prints, three times:
WARNING: config file C:\Users\saura\.livekit/cli-config.yaml should have permissions 600
WARNING: config file C:\Users\saura\.livekit/cli-config.yaml should have permissions 600
WARNING: config file C:\Users\saura\.livekit/cli-config.yaml should have permissions 600
Two problems here:
600 is a Unix permission mode. Windows uses ACLs and has no equivalent, so this warns the user about a condition that cannot exist on their OS and that they cannot act on.
Note the path: C:\Users\saura\.livekit/cli-config.yaml — backslash, then forward slash. Same mixed-separator signature as the /tmp\ failure above.
Both look like Unix path and permission assumptions leaking through the cross-platform layer.
I reproduced this on Windows 11 and found the cause.
On Windows, task runs mktemp with its built-in Go version (from u-root, through mvdan.cc/sh/moreinterp/coreutils) instead of a system binary. In u-root v0.16.0, mktemp uses $TMPDIR if it's set, and otherwise falls back to a hardcoded /tmp. Windows doesn't set TMPDIR, so you get /tmp\NNN, and set_agent_name_if_present fails when it writes to that path.
Proposed fix: in bootstrap.NewTaskExecutor, set TMPDIR to os.TempDir() when it's unset. Mac and Linux behave the same as before. I have a regression test that runs the template's mktemp / >> "$tmp" pattern with TMPDIR unset. It fails without the change and passes with it. I'm happy to open a PR.
Activity
armaan4658 commentedon Nov 2, 2026
I reproduced this on Windows 11 and found the cause.
On Windows, task runs
mktempwith its built-in Go version (from u-root, throughmvdan.cc/sh/moreinterp/coreutils) instead of a system binary. In u-root v0.16.0,mktempuses$TMPDIRif it's set, and otherwise falls back to a hardcoded/tmp. Windows doesn't setTMPDIR, so you get/tmp\NNN, andset_agent_name_if_presentfails when it writes to that path.Proposed fix: in
bootstrap.NewTaskExecutor, setTMPDIRtoos.TempDir()when it's unset. Mac and Linux behave the same as before. I have a regression test that runs the template'smktemp/>> "$tmp"pattern withTMPDIRunset. It fails without the change and passes with it. I'm happy to open a PR.Two notes:
projects/p_/link in lk app create emits console URL with unpopulated project ID (p_) on Windows #910 doesn't come from this bug.p_is written directly into the template'sCONSOLE_URL. Before this fix, though, the link'sagentNamedidn't match the agent's actual name, because the rename step never ran.permissions 600warning is a separate issue, so I've left it out of this fix.