From eadfeef60e295d79e3c3657fba8c68f31f17dcd1 Mon Sep 17 00:00:00 2001 From: firefly Date: Fri, 29 May 2026 17:44:32 -0400 Subject: [PATCH] =?UTF-8?q?docs(agent):=20correct=20resolve=5Fcontext=5Fcw?= =?UTF-8?q?d=20comment=20(None=20=E2=86=92=20caller=20getcwd=20fallback,?= =?UTF-8?q?=20not=20skip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/runtime_cwd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/runtime_cwd.py b/agent/runtime_cwd.py index ad084ac89..d25d38cce 100644 --- a/agent/runtime_cwd.py +++ b/agent/runtime_cwd.py @@ -25,7 +25,9 @@ def resolve_agent_cwd() -> Path: def resolve_context_cwd() -> Path | None: - # None is load-bearing: it signals "skip context-file discovery" so the - # gateway install dir's AGENTS.md isn't slurped (see system_prompt.py). + # None means "no configured cwd": build_context_files_prompt then falls back + # to the launch dir (os.getcwd()) — correct for the local CLI. The gateway + # avoids slurping its install dir by setting TERMINAL_CWD (see system_prompt.py). + # No getcwd arm here: that fallback is owned by the caller, not this resolver. raw = os.environ.get("TERMINAL_CWD", "").strip() return Path(raw).expanduser() if raw else None