Repository navigation
Pi와 omp에도 프로젝트 Memory가 붙는다 - #871
Merged
Merged
Conversation
The shared Pi and omp reader dropped every custom_message entry, so the Memory receipt inside Hide's hidden message was never seen. Hide's own entry (customType hide) is now an injected event the provider recorded, another extension's stays out, and an operator's message that only starts like a reminder no longer counts as provider-injected.
The extension sends the host's own session id beside the session file, and the helper signs Memory receipts for that id, which is what the session reader keys a receipt by. Pi and omp now declare Memory, the extension moves to version 2, and a Pi receipt read from its session file unblocks the next prompt's Memory.
The session-start capsule now rides one written message per session whether or not the guidance arrived with it, and the helper says when it gave one. Only Hide's own custom message is provider-injected, a missing session id is diagnosed, and the tests cover omp, a forked session that copied its parent's receipt, and the helper's signing for the host's id.
…test the later and disabled prompts
…test does, so a loaded machine cannot fail it
…r in process, with room for Memory, instead of retrying the helper
… prompt capsule override in it
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
Related: #869, #870, #871 ## Summary - Read ordinary Cursor chats from native SQLite/protobuf storage with incremental paging and native identity checks. - Feed existing generated labels, archive/body search and desktop/phone conversation details from one shared reader. - Sleep/wake default-root sessions with the exact native ID; refuse known custom roots and duplicate IDs before effects. - Preserve recorded minute timestamps and absent facts; keep fork, tools, native titles and Memory insertion disabled. - Keep native files read-only and cap database work, graph traversal, discovery and returned content.   ## Review - **Judgment**: known-root checks cannot certify later native exec; shell exports may select other history or fail. - **Files to watch**: `hide-session/src/cursor.rs` (identity/caps), `herdr-core/src/live.rs` (lifecycle failures). - **Cost**: lifecycle-only root audit caps directory opens at 64, entries at 10,000 and retained path bytes at 8 MiB. - **Follow-up**: inherited old-attempt pane cleanup remains unresolved in #874; its separate fix follows this PR. ## Evidence - **Confirmed**: native graph fixtures cover paging, immutable source bytes, replacement refusal and consumer dispatch. - **Confirmed**: isolated browser labels, archive/body search, detail, exact wake arguments and pre-close root refusal. - **CI repair**: shared test-binary placement and isolated default-root fixtures preserve assertions and guards. - **Checks**: full Rust tests, web/desktop typecheck, lint, unit tests and builds, plus workspace Clippy passed. - **Limits**: authenticated continuation, installed desktop, physical phone and later native roots remain unverified. - **Images**: synthetic fixture observations on earlier reviewed heads; exact provenance remains in the folded record. <details><summary>Verification record</summary> - PRD: `agents/prd/session-readers-cursor/prd.md` (sha256 57aa6f1c78f5603500fde8af92e25ff5670d1f2877df2f30eea5940356ef193d) - Base 383bbd2 → head 5a8c9d8, verified 2026-10-09T12:33:49.268Z: PASS - Verification report: `agents/runs/session-readers-cursor/verification-report.json` and `agents/runs/session-readers-cursor/verification-report.md`; source fingerprint bf8641a0b0901418feb4be3a925b3099e4a943904c10f22e15f123f91ecbc168 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-web.sh` (exit 0) - S3: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Code: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; full source coverage carried through the actual current-head fixture follow-up and sealed evidence closure; test layout/default-root isolation preserve every prior assertion and guard. Both technical P1s remain: later unknown exec-root selection and #874 cleanup. Follow-ups: proof/effect race, current connector and ownership fences. - Code report identities (current source follow-up / sealed closure): `d5c4db32067c89ec18ed5449c5b0566b19abc3513d7b94ddfff26402b392264f` / `4051b5f03ab53c3b4b12e4ab98280477bbc62d579a64043d183f389a242906c5`. - Fidelity: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; complete canonical parent/child and negative-capability coverage plus same-head evidence closure; independent resume/helper expectations and original consumer/Sleep assertions pass without contract reduction. #874 separate repair and unknown shell roots retain accepted dispositions. Follow-ups: phone currentness, remote replacement and parent aggregate. - Fidelity report identities (current source follow-up / sealed closure): `e37196dd07258d927a2b733303e6708eda3d0bc3b95c4e80d8f0678c7571a9a5` / `eeef201a96e16100457b4fc766419b62dea248288ed1c7f423c3231bc89d9bc0`. - Security: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; complete source/privacy coverage, bounded test-child impact and actual sealed evidence closure; all36 material identities match, with no new finding. Actual exec-root equivalence and inherited past-attempt cleanup remain technically unclosed; authorization is not fix credit. Follow-ups: bounded DTO allocation and non-atomic proof/effect interval. - Security report identities (current source follow-up / sealed closure): `a1021c7daabcc0f77461f2ac13fd619d91b1a7e879088afd18d2b02923ea1a83` / `b60e21c12083c1bcb6777dff24fe7835ed2ac7b2eed4278a8f5d84e5b4f07013`. - Evidence: 33 registered (1 api, 29 log, 1 browser, 2 screenshot); paths are local to the run directory - agents/runs/session-readers-cursor/native-start-resume.json - agents/runs/session-readers-cursor/cli-measure/negative-fork.json - agents/runs/session-readers-cursor/cli-measure/help.json - agents/runs/session-readers-common-v2/cursor-core-journey-2.log - agents/runs/session-readers-common-v2/cursor-web-native-3.log - agents/runs/session-readers-cursor/manual-browser-3/aside-body-search-complete.log - agents/runs/session-readers-cursor/manual-browser-3/cursor-archive-body-search.png - agents/runs/session-readers-cursor/manual-browser-3/cleanup.json - agents/runs/session-readers-common-v2/cursor-opencode-worker-before-fix.log - agents/runs/session-readers-common-v2/cursor-opencode-worker-fixed.log - agents/runs/session-readers-common-v2/cursor-p7-core-integration.log - agents/runs/session-readers-common-v2/cursor-p7-reader-integration.log - agents/runs/session-readers-common-v2/cursor-p7-integration-clippy.log - agents/runs/session-readers-common-v2/cursor-root-guard-reader-2.log - agents/runs/session-readers-common-v2/cursor-root-guard-browser-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-browser-2.log - agents/runs/session-readers-common-v2/cursor-root-guard-clippy-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-web-static-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-web-static-2.log - agents/runs/session-readers-cursor/manual-browser-4/aside-refusal-final.log - agents/runs/session-readers-cursor/manual-browser-4/cursor-duplicate-sleep-refusal.png - agents/runs/session-readers-cursor/manual-browser-4/cleanup.json - agents/runs/session-readers-common-v2/cursor-root-main-integration-1.log - agents/runs/session-readers-common-v2/cursor-sealed-node-repro-1.log - agents/runs/session-readers-common-v2/cursor-sealed-web-repro-1.log - agents/runs/session-readers-common-v2/cursor-sealed-node-fixed-1.log - agents/runs/session-readers-common-v2/cursor-sealed-web-fixed-1.log - agents/runs/session-readers-cursor/delivery/ci-policy-failure.log - agents/runs/session-readers-common-v2/cursor-ci-layout-policy-1.log - agents/runs/session-readers-common-v2/cursor-ci-layout-rust-1.log - agents/runs/session-readers-cursor/delivery/ci-rust-failure.log - agents/runs/session-readers-common-v2/cursor-ci-root-repro-1.log - agents/runs/session-readers-common-v2/cursor-ci-root-fixed-1.log - Changed paths: 56 (see Files changed) - Delivery: mode pr, branch `feat/session-readers-cursor`, base `main` - Verification JSON SHA256 `6780ac85d900e4993e0913314f89c737eb2745b7f41f703f8a2fd265506eabae`; input fingerprint `5bcc6113b536b656e446e3ebf5c219b80b808469d2c35b645afc316dfbd00361`; both post-verification drift flags false, every command mutatedTree=false. - S1: 3,789 passed/0 failed/23 existing ignored; S2: web141 files/1,311 passed/1 existing skipped, desktop17 files/162 passed/4 existing skipped, both typecheck/lint/build; S3: fmt/workspace all-target Clippy warnings denied. Existing jsdom/React-act/bundle warnings remain despite exit0. - Registry: 36 identities total,33 unchanged qualified manual objects and three automatic command logs replaced by current PASS. S1 SHA256 `df7dd0c42987a9e4825b16bdb44a4750c933b403f492352c4b3949f573c6a5bb`; S2 `469e0998a9260f6330e93929dd62cc11732feff2c12a748ca274c12276b42b6d`; S3 `b8cda8538e555660c38b5c7b7be18933c1d36bc274190d4a2604cb1301f1dd6f`. - Preserved earlier sealed attempts: genuine helper-feature/resume expectation FAIL at `e373ce145`, retained report SHA256 `c8a01473a03d39676ff9139d516259690e95322a3bef95946d170c9c7341d623`; corrected `987e4dd6f` PASS retained at SHA256 `4b5421c8d6844526c223fc2cf201311f18a9d97c4e3f2a6ccb8e265e6516d578`. No skip, suite exclusion, timeout or production guard was relaxed. - First PR CI `37927765454` on `987e4dd6f` completed FAIL: existing single-integration-binary policy plus two Rust fixture failures; all other lanes passed, with one existing planned skip. Actual failed-job logs remain: policy SHA256 `ef544218c620c27fcd7189ff7d46cd314e79340e251882c64c98e72f3a459f1e`; Rust `445f578cd31f451e9824333a83751d172e26d9b71f4dd8834b2019b4329b2240`. - CI corrections: `640567fed` moves the unchanged environment audit into `tests/it`, adjusting only its relative include; independent policy3/Rust audit1 pass. `5a8c9d81` isolates two default-root positives in owned self-children before startup capture, preserving their complete bodies and original5s close assertion. The same private nondefault XDG reproduces FAIL2 before and PASS3 after, including unchanged custom/XDG/duplicate/invalid-root negatives. The actual first CI runner's override value is unconfirmed; this demonstrates fixture sensitivity, not exhaustive runner attribution. Each child retains the existing60s run/drain deadline, up to10s exit-confirmation cleanup and64KiB output/stream, without a universal wall-clock or abrupt-owner guarantee. - Browser provenance: archive body search and native detail screenshot came from the reviewed candidate through `7a723749`; duplicate-root Sleep refusal image came from root-guard source `22328f5f7` before main integration. Both use synthetic native storage, an isolated HOME and private Herdr/hided; screenshots show only the product viewport. Earlier automated browser journeys passed 6/6 and guarded-root regression passed 7/7; original failure logs remain qualified. - Native provenance: installed Cursor `2026.10.01-e373342` accepted first-prompt and exact resume argv under private Herdr but reached login only; --fork was rejected with exit1. Native database bytes stayed unchanged. This is not authenticated continuation acceptance. - Unrun limits: actual later shell execution-root equivalence, authenticated continuation/native-ID reporting, installed packaged desktop, physical phone, current remote/helper replacement, native Windows/Linux execution, idle/driven performance and RSS. Retained24 integration remains explicitly ignored pending actual payload; earlier independent compatibility fixtures retain their original scope. Parent aggregate acceptance waits the remaining reader and final integration. </details>
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.
Related: PRD
agents/prd/pi-omp-extension/prd.md· #838 (Pi, omp 확장, 이 PR이 그 위에 Memory를 얹음) · P6 Pi reader #826, omp reader #865 (둘 다 머지됨) · #849의 Security 8(Memory 전 프롬프트 본문 전달)을 닫음, 나머지 항목은 열린 채Summary
#838은 Pi와 omp에 Hide 확장(편지, 안내, 실행 가드)을 붙였고 Memory는 P6의 두 세션 리더가 머지된 뒤로 미뤘습니다(PRD D-09).
이 PR은 그 Memory를 붙입니다: 확장이 프롬프트마다 helper에 묻고, helper는
claude-code훅과 같은 Memory 캡슐과 서명된 receipt를 숨은 메시지에 함께 실어 보냅니다.Memory receipt는 호스트의
getSessionId()(세션 파일 헤더 id)로 서명하고, 편지는 지금처럼 세션 파일 경로로 묶습니다.코어는 Pi와 omp 세션 파일에서 Hide 자신의
custom_message(customType: hide)만 provider가 넣은 문맥으로 읽어 receipt를 받아들입니다. 사용자가 친 receipt 문자열, 다른 확장의 메시지, 부모 세션을 fork한 파일의 receipt는 받지 않습니다.그래서 설정의 Pi와 omp 행의 기능 표에 Memory가 켜집니다(D-08, D-09). 벨은 두 에이전트 모두 계속 꺼져 있습니다.
Review
claude-code훅의 SessionStart 한 번과 다르지만 쓰이지 않은 캡슐을 준 것으로 세지 않기 위해서입니다.{}로 답해 아무것도 하지 않습니다. v1은 릴리스에 실린 적이 없습니다(#838은 v0.3.0 뒤).message항목은 이제 어떤 것도 provider-injected로 읽지 않습니다(전에는 reminder로 감싼 user 메시지가 그렇게 읽힐 수 있었음). 사용자가 붙여넣은 receipt가 Memory를 열지 못하게 하는 변경입니다.hide-session/src/native_file.rs- Memory의 신뢰 경계. Hide의custom_message만with_provider_injected(true)로 읽습니다.hide-agent-hooks/src/plugin/helper.rs,src/pi_extension/extension.js- 운영자 프로세스 안의 확장과 그 helper.native_session은 1~4096자 문자열만 받고, 없으면 Memory 없이 편지만 보내며plugin원인으로 진단합니다.Evidence
verify-cargo.sh test와lintPASS(head f657312, #868과 #870을 병합한 main a41bc1a 위).memory_first:false면 첫 프롬프트에도 시작 캡슐을 주지 않음. Pi의 세션을 파일로 서명하게 바꾸는 결함을 심으면 실패함을 확인.-x), Memory 꺼짐에서memory_startfalse와 receipt 없음, 편지는 매번 도착.custom_message만 provider-injected, 사용자가 친 receipt와 reminder로 감싼 receipt는 아님, 다른 확장의custom_message는 읽지 않음(Pi, omp 둘 다).native_session이 세션 파일 헤더 id와 같고, 숨은 항목이type: custom_message,customType: hide로 남음을 실측.hide-host gh::tests::timed_out_gh_and_its_pipe_holding_helper_are_terminated가 부하 기한으로 실패했고 단독으로는 통과했습니다.codex_trust7개가 app-server initialize 기한으로 실패했고, 단독으로는 통과했습니다.Verification record
agents/prd/pi-omp-extension/prd.md(sha256 676a51347370bcc57965ce68ef407ee2585d2fdab6d3c30b64a5ce9ff7113f7d)agents/runs/pi-omp-extension/verification-report.jsonandagents/runs/pi-omp-extension/verification-report.md; source fingerprint 4d05fea261dcca011e5f277a3a966f42b3e3cf8b14eefabcba9c05b7903f7601bash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)plugin진단, fixture helper, fork 음성 테스트, provider-injected 규칙 좁히기, 낡은 문장 -> 같은 커밋. Security: #849의 Security 8 닫힘.plugin원인 문장, 이후 프롬프트와 Memory 꺼짐의 helper 테스트 -> 849a8d6.native_session= 헤더 id, 숨은 항목 모양)을 보임, Fix now 없음; helper가 대역이라 실제 receipt 서명까지는 보이지 않음(그 부분은 helper 통합 테스트가 맡음)memory선언이 없어 서명되는 receipt가 없고 Pi, omp 경로와 기능 표는 그대로./export에 캡슐이 보임, compaction이나 resume 뒤 안내와 Memory 재전송 없음, Memory 켜기 게이트가claude-code,codex버전만 확인(기존, OpenCode도 같음), v1 확장은 kit 재설치 전까지 동작 안 함, ARCHITECTURE의 receipt 권한 목록에 Grok의hideFromScrollbackprovider-injected는 표시용일 뿐이라는 한 구절,trusted_memory_receipt가memory선언 없는 에이전트를 구조적으로 거절., 실제 바이너리의prompt가 캡슐과 편지를 합치는 배선은 Rust에서 Memory 캡슐과 함께 검사되지 않음(Node와 e2e는 스크립트 쪽만),windows_hook_command.rs의 기존 재시도도 같은 seam으로 바꿀 수 있음.feat/pi-omp-extension, basemain