openai/codex · error · io::Error
filesystem glob subpath
Error message
filesystem glob subpath `{subpath}` only supports `deny` access What it means
compile_scoped_filesystem_pattern rejects glob pattern entries whose access mode is not `deny`. Glob subpath entries currently only express deny-read semantics; broader access on a glob would imply allow semantics the sandbox policy cannot represent.
Solutions
- Use `deny` access for the glob subpath `{subpath}`.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/core/src/config/permissions.rs:651 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/35379c0cab13a177.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/core/src/config/permissions.rs:651
return Ok(special);
}
let subpath = parse_relative_subpath(subpath)?;
let base = parse_absolute_path(path)?;
let path = AbsolutePathBuf::resolve_path_against_base(&subpath, base.as_path());
Ok(path.into())
}
fn compile_scoped_filesystem_pattern(
path: &str,
subpath: &str,
access: FileSystemAccessMode,
) -> io::Result<String> {
// Pattern entries currently mean deny-read only. Supporting broader access
// modes here would imply glob-based read/write allow semantics that the
// sandbox policy does not express yet.
if access != FileSystemAccessMode::Deny {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
format!("filesystem glob subpath `{subpath}` only supports `deny` access"),
));
}
let subpath = parse_relative_subpath(subpath)?;
match parse_special_path(path) {
Some(FileSystemSpecialPath::ProjectRoots { .. }) => {
// Keep `:workspace_roots` glob patterns symbolic until the active
// workspace roots are known, then materialize them for cwd and any
// runtime/profile-added workspace roots together.
Ok(project_roots_glob_pattern(&subpath))
}
Some(_) => Err(io::Error::new(
io::ErrorKind::InvalidInput,
format!("filesystem path `{path}` does not support nested entries"),
)),
None => {View on GitHub (pinned to 339751715c)