Repository navigation
[codex] support session-isolated app-server clients - #81777
henkterharmsel wants to merge 1 commit into
Conversation
|
Codex review: found issues before merge. Reviewed July 3, 2026, 11:54 PM ET / 03:54 UTC. Summary PR surface: Source +775, Tests +957. Total +1732 across 50 files. Reproducibility: yes. for the review finding from source: PR-head app-server bound conversations can carry distinct isolation keys while still serializing through a queue keyed only by sessionFile. I did not run the PR tests in this read-only review. Review metrics: 3 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Refresh the branch, key every Codex app-server binding/client/active-turn/bound-turn path by one canonical isolation key, and merge only after maintainer acceptance for the config/API/state surfaces with upgrade and Telegram proof. Do we have a high-confidence way to reproduce the issue? Yes for the review finding from source: PR-head app-server bound conversations can carry distinct isolation keys while still serializing through a queue keyed only by sessionFile. I did not run the PR tests in this read-only review. Is this the best way to solve the issue? No, not yet: session isolation is a plausible mitigation, but the implementation is incomplete until bound-turn queues use the same isolation dimension as bindings, active turns, and shared clients, and maintainers accept the new config/API/state surfaces. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +775, Tests +957. Total +1732 across 50 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
8380a66 to
229df6e
Compare
229df6e to
c8ca8e6
Compare
c8ca8e6 to
5d0933d
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing this draft because the implementation has been superseded by the Codex runtime and lifecycle redesign that landed after it was opened. The branch now conflicts across 50 files, its persisted/config/plugin API surfaces no longer match current main, and review identified an incomplete bound-turn queue isolation path. We also no longer deploy this patch locally on OpenClaw 2026.7.1; current app-server liveness retirement and terminal-idle recovery have kept the original cascading-stall symptom bounded in production. The upstream Codex silent-turn issue (openai/codex#21937) remains open, so if the blast-radius problem reproduces on the current runtime, I will report it against the current architecture and propose a narrower fix rather than reviving this stale implementation. |
Summary
appServer.clientIsolation=sessionso Codex app-server clients and thread bindings can be isolated per OpenClaw runtime-policy session/topic instead of shared per agent/btw,/compact, Codex plugin commands, bound conversation turns, diagnostics, gateway compaction, and reset/delete cleanup through the same runtime-policy isolation keyappServer.turnTerminalIdleTimeoutMsandappServer.nativeCompaction; keep existing defaults (clientIsolation=agent, native compaction on, 30 minute terminal idle timeout)Why
Codex app-server workers can silently stop producing terminal events (see openai/codex#21937). OpenClaw previously reused one shared Codex app-server client per agent, so a wedged worker could poison unrelated topics. This keeps old behavior by default and lets operators opt into per-session/topic isolation.
Real behavior proof
appServer.clientIsolation="session".openclaw-gatewaysystemd service, the bundled Codex plugin,@openai/codex0.130.0, and a Telegram group with multiple active topics. Hostname, account identifiers, topic ids, and tokens are redacted.appServer.clientIsolation="session", restartedopenclaw-gateway, checkedsystemctl --user show openclaw-gateway, checkedjournalctl --user -u openclaw-gateway, then exercised multiple Telegram topics with Codex enabled.Not tested in CI/local suite:
pnpm teststill fails on unrelated existing non-Codex failures listed below.Validation
pnpm exec vitest run extensions/codex/src/commands.test.ts --reporter=dot(1 file / 89 tests passed)pnpm exec vitest run extensions/codex/src/app-server/compact.test.ts --reporter=dot(1 file / 15 tests passed)pnpm exec vitest run src/gateway/server.sessions.reset-hooks.test.ts src/gateway/server.sessions.compaction.test.ts --reporter=dot(2 files / 15 tests passed)pnpm test src/plugins/commands.test.ts(1 file / 42 tests passed)pnpm test extensions/codex/src/commands.test.ts(1 file / 89 tests passed)pnpm test extensions/codex/src/app-server/session-binding.test.ts extensions/codex/src/app-server/shared-client.test.ts extensions/codex/src/app-server/compact.test.ts extensions/codex/src/app-server/run-attempt.test.ts(4 files / 134 tests passed)pnpm test src/gateway/server.sessions.reset-hooks.test.ts src/gateway/server.sessions.compaction.test.ts(2 files / 15 tests passed)pnpm test:extension codex(50 files / 681 tests passed)pnpm check(passed)pnpm build(passed)codex review --base upstream/main(no actionable correctness issues)pnpm test(failed after 76 shards on unrelated existing non-Codex failures: Telegram durable-final proof, NVIDIA/LM Studio provider expectations, oc-path perf threshold, acpx source-vs-dist path, gateway credential/auth env expectations, Discord patch summary truncation, IPv6 loopbackEADDRNOTAVAIL ::1, and agent/config test mocks missing unrelated exports.)AI-assisted
Yes. Codex implemented and locally reviewed the change; the production behavior proof above was run by a human operator on their own OpenClaw instance. I understand the code paths changed.