Support direct file read/write APIs instead of shell commands

Resolved 💬 4 comments Opened Jan 25, 2026 by dismonjames Closed Mar 20, 2026

What feature would you like to see?

Support direct file read/write APIs (e.g. readFile/writeFile) instead of relying on shell commands for filesystem access.

Additional information

Additional context

  • Using PowerShell/bash commands for file I/O leads to multiple cross-platform issues:
  • CRLF vs LF line endings
  • Encoding mismatches (UTF-8 vs system codepages)
  • Shell escaping for paths with spaces/special characters
  • Inconsistent behavior across Windows / macOS / Linux

Why it matters

  • Agents and tools often need to write multi-line files (source code, configs, serialized data)
  • Shell-based writes easily corrupt or reformat content unintentionally
  • Beginners struggle with shell quirks → worse onboarding UX

Proposed direction

  • Introduce a direct file API surface (e.g. readFile, writeFile, appendFile)
  • Ensure consistent behavior across CLI and other Codex surfaces
  • Avoid shell entirely for non-interactive filesystem operations

Willing to contribute

I’m interested in contributing a prototype implementation (especially Windows support).
Happy to help with API design, cross-platform behavior, and testing.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗