Skip to content

apply_patch and view_image fail with false "os error 206" (filename too long) under restricted permission profile on Windows #31511

Description

@okki-LC369

codex-cli 0.142.5 (Windows, elevated sandbox)。カスタムプロファイル(:workspaceを拡張し:root=deny)下で、apply_patch・view_imageが偽の「ファイル名が長すぎる」エラーで失敗する件を報告。

  • 実パス長は60〜70文字程度(Windowsの260文字上限には遠い)
  • 同じファイルへのPowerShell経由アクセス(Copy-Item/Set-Content等)は同一セッションで正常成功
  • パスは付与された書込み/読取り可能な範囲内(承認プロンプトなし・該当denyルールなし)
  • 長いパス/短いASCIIパスどちらでも再現=パス長自体が原因ではない
  • 以前の:root=read設定では正常動作していた→:root=denyへ切替後から一貫して再現
  • 影響:apply_patchはシェル経由で代替可能。view_imageには代替手段がなく、この構成下ではモデルが画像を目視できない

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions