Skip to content

Environment

Where Codex can run commands and read project files.

LocalEnvironment dataclass

Run commands in a directory on the machine running the harness.

Source code in src/openai_agents/codex/environment.py
@dataclass(frozen=True, kw_only=True)
class LocalEnvironment:
    """Run commands in a directory on the machine running the harness."""

    workspace_directory: str | PathLike[str] = "."