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
A --copy session fails to build on Windows when a shader path passes 260 characters #97
mirai session start demo --copy in the worktree mirai/.worktrees/profilers failed to build. The include path of an FSR shader header was 279 characters, over the 260-character limit of Windows paths.
The copy lives under demo/.mirai/tmp/session-copy-<n>/, which adds about 40 characters to every path of the project.
The FSR plugin's headers are deep already.
Without --copy the same build works.
AGENTS.md asks for --copy for sessions against the editor, so on Windows the rule can fail in a deep checkout.
Found while verifying #13. Not reproduced outside that worktree.
Expected
A --copy session builds wherever the checkout builds. For example, a shorter copy folder (outside the project, or a short name), or long paths (\\?\) where the build opens files.
Tried to reproduce on mainb33d9a2, and it did not fail.
I ran mirai session start demo --copy from a worktree at the same depth as the one in the report (mirai/.worktrees/copy-path, 83 characters, like .worktrees/profilers).
In that layout, the deepest FSR header staged into a copy is 264 characters: <root>/demo/.mirai/tmp/session-copy-<10 digits>/.mirai/shaders/include/programs/plugins/fsr/fsr3/frameinterpolation/ffx_frameinterpolation_reconstruct_dilated_velocity_and_previous_depth.h
Odin's own file calls handle it, so the path alone does not break the build.
The failed copy of the report (.worktrees/profilers/demo/.mirai/tmp/session-copy-2018504842) kept empty .err and .out logs, so the failing tool and the exact 279-character path are not recorded.
Most likely the failure needs a shader compile on a cache miss, where an external tool (slangc) opens the header without long-path support. My run reused every stage.
What would settle it: a --copy session whose project shaders miss the cache, in a checkout at least this deep, keeping the shader tool's output. I am not opening a PR until that names the tool, so the fix (a shorter copy folder, or the long-path form for that tool) goes where the limit really is.
Reproduced outside a worktree, in the main checkout, with mirai session start demo --copy. The failing path is 261 characters:
mirai build: could not generate the shaders of the project: could not copy the programs of …/plugins/fsr/shaders: …/demo/.mirai/tmp/session-copy-0401953508/.mirai/.mirai-shaders-7622721470/include/programs/plugins/fsr/fsr3/frameinterpolation/ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid.h could not be written (Not_Exist)
The likely cause:
copy_sources in cook/shaders/programs.odin (around line 567) writes with os.make_directory_all and os.write_entire_file. Those take the path as it is.
std/serial/file_windows.odin (file_wide) already handles long paths: past 248 characters it makes the path absolute and prefixes \?\. The copy of the programs does not go through it.
Writing those files through serial, or a long-path-aware directory creation, may fix it without shortening the copy folder.
Activity
5hif7y commentedon Nov 15, 2026
Tried to reproduce on
mainb33d9a2, and it did not fail.mirai session start demo --copyfrom a worktree at the same depth as the one in the report (mirai/.worktrees/copy-path, 83 characters, like.worktrees/profilers).editor.dll(214 s). The API then did not answer in 180 s, which is the cold software tracer of How many pipelines compile at once follows the cores, not the memory each compile takes #91, not this.<root>/demo/.mirai/tmp/session-copy-<10 digits>/.mirai/shaders/include/programs/plugins/fsr/fsr3/frameinterpolation/ffx_frameinterpolation_reconstruct_dilated_velocity_and_previous_depth.hOdin's own file calls handle it, so the path alone does not break the build.
.worktrees/profilers/demo/.mirai/tmp/session-copy-2018504842) kept empty.errand.outlogs, so the failing tool and the exact 279-character path are not recorded.slangc) opens the header without long-path support. My run reused every stage.What would settle it: a
--copysession whose project shaders miss the cache, in a checkout at least this deep, keeping the shader tool's output. I am not opening a PR until that names the tool, so the fix (a shorter copy folder, or the long-path form for that tool) goes where the limit really is.🤖 Generated with Claude Code
5hif7y commentedon Nov 16, 2026
Reproduced outside a worktree, in the main checkout, with
mirai session start demo --copy. The failing path is 261 characters:The likely cause:
copy_sourcesincook/shaders/programs.odin(around line 567) writes withos.make_directory_allandos.write_entire_file. Those take the path as it is.std/serial/file_windows.odin(file_wide) already handles long paths: past 248 characters it makes the path absolute and prefixes\?\. The copy of the programs does not go through it.Writing those files through
serial, or a long-path-aware directory creation, may fix it without shortening the copy folder.🤖 Generated with Claude Code