Skip to main content

effective_working_dir

Function effective_working_dir 

Source
pub fn effective_working_dir(
    working_directory: &str,
    agent_name: &str,
) -> String
Expand description

The directory this agent will actually run in.

Must match agent.open exactly, or the answer describes a directory the agent never uses (Codex, PR #3156): a blank working_directory means the per-agent default, and a ~ path is expanded at launch. Reproducing both here rather than reading the stored value raw is the difference between reporting an agent’s instructions and reporting nothing at all, since the default-workdir case is the common one (SPEC_FIX_PERSONAL_MEMORY_EMPTY_WORKDIR_2026_09_01.md).