fix: let Codex subagents start when an agent folder name uses capital letters (#201520) Root cause: src/gateway/session-row-scope.ts:262 (main 852f25b33359) mapped each physical store target to a resident store by exact path string, while resident stores are keyed by canonical filename. When an agent's `agentDir` folder uses capital letters (`agents/Worker/agent`) and the default lower-case locator (`agents/worker/...`) reaches the same database on a case-insensitive volume, the lookup missed the resident row. The Gateway session index then reported a newly spawned child as absent, and the Codex requester-policy re-check, which reads the database directly and finds the row, refused the child. Fixes #201423 ## What Problem This Solves On macOS, if an agent's folder name contains capital letters, every `sessions_spawn` into a Codex-runtime child fails within a few hundred milliseconds, before the child's first turn, with "Codex requester policy changed; retry the turn to prepare current policy." Retrying doesn't help. Turns in existing sessions still work. ## User Impact User impact: subagents on the Codex runtime start normally again when agent folders use capital letters on a case-insensitive disk. Folder names whose case already matches, and case-sensitive file systems, behave as before. The requester-policy check is unchanged: a requester that really changed between spawn and child start is still refused. ## Why This Change Was Made The session index answers "is this row present?" for policy preparation. Its scope mapped a store path to the loaded store only when the strings were identical. The fix resolves the path through the existing canonical database-path key (`resolveDatabasePathKey`) before falling back, so both spellings select the same loaded store. No new config and no change to the policy check. Thanks to @thejeys19 for the precise report, the trace to the session-index "known absence" answer, the local patch confirming it, and the follow-up that pointed to capitalized `agentDir` folders. ## Evidence Proof lines: https://github.com/openclaw/openclaw/pull/201520#issuecomment-6994732919 - Reproduced through the real product: built Gateway, real bundled Codex app-server, local ChatGPT-backend fixture. A parent session calls `sessions_spawn` into agent `worker` with `agentDir` `agents/Worker/agent` (folder created with that case). - base 852f25b33359, twice: child fails with "Codex requester policy changed", no child output. - v2026.11.5 (e13cf15ece9b), the reporter's build: same failure (`lane task error ... durationMs=103 error="Codex requester policy changed ..."`). - candidate, twice: child runs and replies. - control, candidate with a matching-case folder `agents/worker/agent`: child runs and replies. - Regression test `session-row-projection.topology.test.ts` "reads an agentDir row through another spelling of its database file (#201423)": red twice on base (`expected undefined to be 'child-id'`), green twice on candidate. It uses a directory link on case-sensitive file systems so CI on Linux covers the same mismatch. - Control: a reassigned requester (`spawnedBy` changed after preparation) is still refused by `prepareCodexNativeExecutionPolicy` (throwaway probe, not committed); an unchanged requester is admitted. - Focused suites green: session-row-projection.topology, session-row-projection.archived, native-execution-policy, native-execution-policy.authority-chain. oxfmt and oxlint clean on changed files. - Codex: the refusal happens before `thread/start` (`~/Developer/codex` 7fb4014d52, `codex-rs/app-server/src/request_processors/thread_processor.rs:609`); no Codex-side behavior is involved. Line delta vs merge base: production +18 −2, tests +35 −1. The canonical path lookup runs once per physical target during topology preparation; row queries compare strings only. Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Current
·
C2
·2026-11
fix: let Codex subagents start when an agent folder name uses capital…
Find Your Interest
- The Roundup by ByteByteGo
- How to detect Claude Duet AI agent traffic
- How to detect Instinct, the invite-only AI agent you text
- When your AI agent publishes internal data
- How to detect AI agents and AI assistants
- DDoS'ing the human brain
- Github and Open-source Is a Boon for the Underprivileged
- Github and Open-source Is a Boon for the Underprivileged
- How to detect ChatGPT Dots AI agent traffic
- Run AI Agents in TeamCity
Current
·
C2
·2026-11






