[codex] Add session lane and lock diagnostics#2
Open
brian-chenyang wants to merge 2 commits into
Open
Conversation
brian-chenyang
marked this pull request as ready for review
May 18, 2026 13:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds production-safe diagnostics on top of the current
v2026.3.9-fix-by-kevin-20260403OpenClaw branch.session:*lanes, withlaneType,active,queued,peakActiveLast30s,depth, andoldestQueuedMs.Why
OpenMAI incidents showed
mainlane was not saturated, while user-facing failures correlated with long session-lane waits, provider timeouts, andcontainers.json.lockcontention. The previous logs could not distinguish whether the lock was held too long, waited on too long, or merely failed at the end of a long task.Validation
pnpm exec vitest run --config vitest.unit.config.ts src/process/command-queue.test.tspnpm exec vitest run src/agents/session-write-lock.test.tspnpm format:check src/process/command-queue.ts src/process/command-queue.test.ts src/logging/diagnostic.ts src/infra/diagnostic-events.ts src/agents/session-write-lock.ts src/agents/session-write-lock.test.tspnpm exec oxlint --type-aware src/process/command-queue.ts src/process/command-queue.test.ts src/logging/diagnostic.ts src/infra/diagnostic-events.ts src/agents/session-write-lock.ts src/agents/session-write-lock.test.tspnpm build