Repository navigation
Fix refreshed host instructions in reused ACP sessions - #493
Conversation
There was a problem hiding this comment.
Important
Unchanged AGENTS.md instructions currently invalidate reused sessions because their generation-local framing changes.
Reviewed changes Reviewed the host-instruction fingerprinting, session replacement and persistence paths, and real-process regression tests.
- Instruction identity: Hashes the trimmed, bounded host instructions used to construct fresh ACP prompts.
- Session reconciliation: Rebuilds warm or resumed sessions on instruction changes and persists the fingerprint with the native session record.
- Tool continuation: Cancels an in-flight bridged-tool prompt when instructions change and reconstructs under the refreshed instructions, with fake-agent coverage and updated project memory.
Validation: npm run test:acp passed all 143 tests. An additional probe using the real AGENTS instruction refresher and fake ACP process reproduced the inline finding. Live, signed-in Antigravity acceptance was not exercised.
gpt-6.1-sol | 𝕏
There was a problem hiding this comment.
Important
Nonce normalization can still discard a reused session when only undelivered instruction text changes near the size limit.
Reviewed changes Reviewed the follow-up since 7ab6f8e, including the fix for generation-local AGENTS markers and its integration coverage.
- Normalized AGENTS identity: Ignored generated tag UUIDs while retaining the wrapper header, JSON records, and other host guidance in the fingerprint.
- Extended real-refresher coverage: Verified unchanged warm and persisted session reuse across separately created refreshers, plus reconstruction after A to B to A edits.
- Updated project memory: Documented the stable-guidance comparison and refreshed test coverage.
Validation: npm run test:acp passed all 145 tests. An additional real-refresher/fake-process probe reproduced the boundary issue inline. Live, signed-in Antigravity acceptance was not exercised.
gpt-6.1-sol | 𝕏
Hermes Review BotConfidence: 5 Reviewed the whole PR again, with the previous Hermes checkpoint and prior reviews as context. Engine: SummaryAiden's ACP runtime now fingerprints bounded host instructions ( Confidence Score: 5/5Full trace of prompt construction, session lifecycle reconciliation, disk persistence, and tool cancellation confirmed end-to-end correctness with zero regressions against latest 📁 Important Files Changed
FindingsNo findings. 📊 Sequence DiagramUnchanged from the previous review. Machine-Readable Findings[]🕑 Review History
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the follow-up since 4320864, focusing on instruction-cutoff preservation and session reuse.
- Preserved instruction offsets: Replaced generated AGENTS tag UUIDs with equal-length stable placeholders so fingerprinting respects the original 64,000-character delivery cutoff.
- Added boundary coverage: Verified that AGENTS edits beyond the delivered prefix preserve both warm session reuse and saved-session resume through the real refresher and fake ACP process.
- Updated project memory: Documented fixed-width normalization and the boundary behavior.
Validation: npm run test:acp passed all 146 tests; npm run type-check passed. Live, signed-in Antigravity acceptance was not exercised.
gpt-6.1-sol | 𝕏
|
/hermes review full |
|
/hermes review full |
|
/hermes review full |
|
/hermes review full |

Summary
Fixes #398.
Validation
npm run build:worktree-file-ioandnpm run build:subagent-file-mutatornpm run test:acp(146 passed)npx tsx --test main/services/agents-instructions.test.ts(19 passed)npm run test:subagent-file-mutator:native(31 passed, 3 skipped)npm run type-checknpm run lintgit diff --checkThe fake agent runs through the real ACP process, connection, and runtime. Tests inspect the prompts for unchanged instructions, A to B to A, saved-session resume, and a mid-turn tool continuation. The review follow-up uses separately created real AGENTS instruction refreshers with identical file content to verify warm and persisted reuse; edited content still rebuilds. A boundary test changes AGENTS text at raw index 64,010 while the delivered 64,000-character prefix stays identical, then verifies warm and persisted session reuse.
The earlier isolated worktree run of
agents-instructions.test.tsfailed its native reader case withio_failed. After merging main and building the newly required subagent file mutator helper, that suite passes 19 of 19 and the native helper suite passes 31 cases with 3 skipped. A signed-in Antigravity account was not used for live-provider acceptance.Hosted CI finding
544e0af6e995ee563120f8cdf00181e7dcd2dc78failedmain/services/bot-runtime/live-projection.test.tscasewhile classifying fails, a cached routine stays hidden and the person's classified message stays listed; the new one waits, then appears. Itsretries are throttled, saw 3 callsassertion failed; 3,411 of 3,412 tests passed. This PR changes no Bot runtime or test files. PR #502 recorded the same spec and symptom on its first head. The focused spec passes locally. This is evidence of a pre-existing timing-sensitive failure, though the underlying timing cause remains unproven. A passing rerun would not erase the flaky-test finding. No retry or timeout policy was changed.A single failed-job rerun of workflow 38818022683, attempt 2 was requested after attempt 1 completed, on the same head
544e0af6e995ee563120f8cdf00181e7dcd2dc78. No further rerun is permitted by the one-rerun rule. Attempt 2 completed successfully, including the runtime-subagents job. The first-attempt Bot retry-throttling failure remains recorded as a flaky-test finding; the passing rerun does not prove its timing cause is fixed.The later exact-head workflow 38852569389 on
6d262043967b4d339d3d64ce7556e27f342248bbendedcancelled: Electron E2E shard 2 exceeded the configured 20-minute job execution limit while its deterministic E2E test step was running. GitHub's check-run annotation statesThe job has exceeded the maximum execution time of 20m0s; its job-log API returned 404. Shards 1 and 3 passed. The exact stuck test is unknown, so this remains an unresolved CI gate on that head. No timeout or retry policy was changed.The latest-head runtime-subagents job 116931184168 on
b34432b86a66bd68d6995a02fa8d58b1c2367ec6failed the same unchangedmain/services/bot-runtime/live-projection.test.tscase andretries are throttled, saw 3 callsassertion. This job had one failed test among 3,412. All three E2E shards passed. Main's runtime-subagents job on base515de67389c5d08ccc78ad215997a0bfc8a1206epassed, and the focused spec passed locally on this PR head; the timing cause remains unproven. After the workflow became terminal, I requested one same-head failed-job rerun, attempt 2. The rerun passed, including runtime-subagents andCI required, on unchanged headb34432b86a66bd68d6995a02fa8d58b1c2367ec6. The first-attempt failure remains an open flaky-test finding; no further rerun is permitted.Latest-main synchronization
Merged
origin/mainat3473089fb2ae2cbe0db4e4ed7fef163057972137into the PR branch without conflicts, rebase, or force-push. The current head isfd0993d245c70256d49e6f82096c53251a4f5be7. Relative to main, the feature diff remains six ACP/project-memory files. The root package test chain and Remote revision 33 protocol and fixtures match main; this PR changes no Remote or mobile contract.After installing the Pi 1.3.0 dependency lock, local checks passed:
npm run test:acp(146), focused AGENTS/Pi catalog tests (120),npm run test:subagent-file-mutator:native(31 pass, 3 skip),npm run test:ci-policy(63),npm run type-check,npm run lint, andgit diff --check. Earlier focused Bot/Remote and simulator E2E checks passed on the preceding merge.Two broader local runs on an earlier main merge did not fully pass.
npm run test:clifailed its unchanged extension-binding release test inbind-rejectmode (shutdowns0, expected 1) after a long run; the same test passed alone. A combined Remote test run and an isolated rerun both timed out in the unchangedidentity reads and healthy LAN wake do not await optional Tailscale inspectioncase at its one-secondwithin()fence. Their causes are unresolved; no timeout, retry, or unrelated production code was changed.Exact-head CI run 38985972307 and bot reviews are pending.
Hermes review gate
Earlier full and follow-up reviews failed in the AGY engine before a verdict. Read-only bot-host logs identified
RESOURCE_EXHAUSTED (code 429): Individual quota reached; the reported reset was approximately 15:34 UTC on 2026-10-16. Hermes later posted a successful full-review status on an earlier head, but that does not review this commit. I requested a fresh full review forfd0993d245c70256d49e6f82096c53251a4f5be7. A successful verdict on this exact head and resolution of any actionable threads remain required.