Repository navigation
improve(gateway): discover Claude history without blocking requests - #145684
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 2:42 AM ET / 06:42 UTC (Revision 2). ClawSweeper reviewWhat this changesClaude CLI history snapshots search project directories asynchronously in bounded batches so discovery does not block other Gateway requests. Merge readiness✅ Ready for maintainer review This remains useful: current main and v2026.9.4 still perform synchronous transcript discovery. The reviewed patch preserves selection and cache behavior, and no actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway combines OpenClaw chat history with transcripts from a bound Claude CLI session. Transcript discovery feeds the existing redacted snapshot cache and history response. flowchart LR
A[Chat history request] --> B[Bound Claude session]
B --> C[Async project discovery]
C --> D[First matching transcript]
D --> E[Fingerprint and snapshot cache]
E --> F[Redacted merged history]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +47, Tests +81. Total +128 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep asynchronous discovery within the existing Claude history owner while preserving directory precedence, snapshot invalidation, and synchronous fallback contracts. Do we have a high-confidence way to reproduce the issue? Yes, from source: opening bound Claude history on current main synchronously scans project directories before checking the snapshot cache. The PR reports a matching synthetic reproduction; this review did not execute it. Is this the best way to solve the issue? Yes. Moving filesystem discovery onto asynchronous operations repairs the remaining blocking stage without changing transcript selection, stored state, or the synchronous callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9e44dba516e8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…penclaw#145684) * improve(gateway): discover Claude history without blocking requests * test(gateway): scope async history assertions to transcript discovery
Related: #145679
What Problem This Solves
Resolves a problem where opening Claude CLI conversation history blocks other Gateway requests while searching a large project directory.
Why This Change Was Made
Async history snapshots now discover transcripts using asynchronous directory reads and bounded batches of filesystem probes. Results preserve directory-order precedence. Synchronous readers retain their existing synchronous contract; snapshot freshness and cache ownership stay unchanged.
User Impact
Other requests remain responsive during transcript discovery, including warm history reads. The selected transcript and imported messages remain unchanged.
Evidence
41c45d213063896073a08b98d3a4f22d9ca72950.