Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed September 13, 2026, 12:53 PM ET / 16:53 UTC. ClawSweeper reviewWhat this changesAdds current-request fields to prompt hooks, uses them for Active Memory recall and request reuse, and retains timeout results until the run ends. Merge readiness⛔ Blocked before merge - 6 items remain This remains useful work: current main lacks the request-aware recall path, and the related merged fix does not cover it. The proposed integration is incomplete and lacks real behavior proof. Priority: P2 Review scores
Verification
How this fits togetherActive Memory enriches an agent’s prompt with relevant memories before the model responds. The harness supplies the request and projected history; Active Memory decides whether to recall and whether an existing result can be reused. flowchart TD
A[Admitted user request] --> B[Harness prompt preparation]
C[Conversation history] --> B
B --> D[Prompt hook]
D --> E[Recall intent and request identity]
E --> F[Reuse result or search memory]
F --> G[Enriched agent prompt]
Decision needed
Why: This deliberately replaces the cleanup-then-retry behavior in the prior merged implementation, trading same-run recovery for a bounded recall budget. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +14, Tests +53, Docs +5. Total +72 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry the admitted request and stable identity through the existing producer, retain all authorization partitions, and adopt one-budget timeout semantics only with explicit owner acceptance and upgrade proof. Do we have a high-confidence way to reproduce the issue? Yes, from source: Codex passes projected history as prompt, and Active Memory uses that input for intent and recall identity. No runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? The explicit producer-owned request is the right approach, but the producer must populate it; retaining terminal timeouts is a separate policy choice. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7bda807a35f9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
I opened a focused contribution on top of this PR: sercada#1 It does two things in separate commits:
One factual correction for this PR's description: the relevant Codex producer is present in this repository at Validation on the contribution: 264 focused tests passed, core/extensions typechecks passed, and formatting passed. No runtime deployment was performed. |
|
Superseded by #149180, which landed on main on 2026-09-16 with this PR's request-boundary change and keeps this contribution in its history. Closing in favor of that merged fix. The remaining one-recall-budget-after-timeout behavior is being reviewed separately. |
Related: #88077, #106957, #115627. Alternative to the envelope-parsing approach in #110898.
What Problem This Solves
Fixes Active Memory treating reconstructed conversation history as the current request and spending another recall budget when the same request's prompt is rebuilt.
User Impact
With the harness producer update below, old history no longer activates recall for an ordinary new message, and prompt rebuilding reuses the current request's result. Different requests and authorization/resource scopes remain independent. There are no configuration or memory-source changes.
Integration dependency: the Codex producer is in a separate repository that is unavailable to this contributor. This PR supplies the public hook contract, core relay, and Active Memory consumer; Codex must supply the two optional fields below for the reconstructed-prompt fix to take effect. Existing producers retain their current behavior until updated. This PR is not presented as a complete standalone Codex rollout.
Why This Change Was Made
Carry the existing request from its producer instead of parsing user-controlled envelope delimiters or truncating the user's message. Run-local reuse uses request text plus native message identity while retaining all existing authorization/resource dimensions. The independent cross-turn cache stays query-based.
The timeout change is a deliberate budget policy: retain a terminal timeout result through
agent_end, even while resource cleanup settles. Previously, cleanup allowed another recall for the same request. It does not fix or explain the first timeout and does not prevent a subsequent run from recalling.Required corresponding Codex caller update, immediately before calling the shared harness helper (using existing local variables):
return await resolveAgentHarnessBeforePromptBuildResult({ + currentUserMessage: params.prompt, + currentUserMessageId: currentUserTurnIdempotencyKey, prompt: prependCurrentInboundContext(promptState.promptText, params.currentInboundContext),That producer must capture the admitted request before continuity/context projection and preserve the native message identity across preparations. It must not derive either field from reconstructed prompt text. The published 2026.9.4 producer was inspected; current private source could not be inspected, so maintainers must verify and land its source change separately.
Evidence
vitest run extensions/active-memory src/agents/harness/prompt-compaction-hook-helpers.test.ts: 450 tests passed across 9 files (133.77 seconds, Node 24.18.0). Native hook relay tests cover both ordinary and authorized prompt dispatch.