You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#827 follow-ups: Codex tool-set timing and failed-read caching #918
Follow-ups from the two review lenses on #827 (security: SAFE, state: SAFE). None block; none gives a thread more than its profile allows.
From the security lens
apps/server/src/fork/codexMcpProfile.ts:340-353: when Codex starts a turn by itself, the narrowed T3 tool set is fixed a few milliseconds after the turn starts. Fix the set before the turn can make its first request.
apps/server/src/fork/codexMcpProfile.ts:289 (reached from watchTurn at :340-342 and from thread/goal/set at :322-324): a sub-agent turn, or a goal set to active, fixes the parent thread's set again while the parent's turn is still running, so a profile change can reach a running turn early. The docs say a running turn keeps its set: fix the code or the docs.
apps/server/src/fork/codexMcpProfile.ts:341: a turn on a thread T3 has not seen yet keeps the last set it had.
Requests that do not come from a thread (for example a shell t3 command) see every T3 tool. Already documented; listed here so it stays a known limit.
From the state lens
5. apps/server/src/fork/mcpT3ToolFilter.ts:234-239: if a request arrives before any turn (Codex listing tools while loading a thread) and the store or settings read fails right then, the refused set is remembered. A provider that lists tools once keeps the short list after the next turn fixes the real set. Do not remember a failed read; work it out again on the next request.
6. apps/server/src/fork/mcpProfileTurnCheck.ts:121: each Codex turn works out its profile three times, each reading settings and the store. Work it out once per turn.
Activity