Repository navigation
feat: turn repeated requests into Hide global instruction fixes and keep Memory tidy - #1816
Merged
Merged
Conversation
A session start's hook answer now carries global-instruction.md from the core's state folder in its own slot and cap (4 KiB, 1,600 estimated tokens), whether or not Memory answers. Claude Code, Codex and Antigravity get it at SessionStart, OpenCode, Pi and omp with the first prompt. The core module also owns the one-line apply and revert the 제안 tab will use.
Schema 22 ages cards no one was given or said (stale after 30 days, archived after 60, protected when the operator said a rule or decision in two sessions), records SessionStart index receipts apart from body receipts, counts ignored and missed cards, folds same-meaning cards on the analysis answer, keeps the operator's repeated requests, and lets the operator or a given agent recheck a card (hide memory recheck). Every automatic change is in a per-card history with its undo, and the Memory snapshot carries the archive list, the history and the new actions.
The Memory tab marks a memory unused for 30 days, folds archived ones under one line with Bring back, adds Check again to a memory shown in full, and lists what Hide changed on it by itself (aging, added words, merges, rechecks) with Undo or the reason there is none. Architecture, UI behavior and hook docs describe aging, ignored and missed counts, merges, repeats, rechecks and the session-start index receipt.
Memory's analysis now hands the suggestion ledger two signals: each time the operator repeated a request it named (with the sessions behind the card that says the same) and each session that was given a rule or preference card and still had to say it again. Their lines are grouped by meaning at once and scored by where it was said again, rising at 4, 3 or 2 points by quantity, or after two ignored sessions. A personal line is written into the Hide global instruction on the operator's press with no pull request, can be taken back alone, and is offered again when a session that was given it repeats it; a project line goes through the existing pull request ladder, as a skill for a procedure. Opening a row's evidence reads the masked words again and a row none of whose words can be read is not applied.
…ions tab A personal line shows the line it would put into the Hide global instruction, adds it with the preview it was drawn from, and folds under Applied with Undo; a held, changed, edited or failed write says why, with Open file where the file itself needs a hand. Opening a row reads its words back masked, says when they can no longer be confirmed, and holds the press when none can. The tab says once when sessions are not given the file, and settings name the two new signals.
A merge no longer keeps or absorbs an archived card, which took both out of every hook. An agent's own hide memory show no longer counts as the card being given for a recheck, and the Memory tab's recheck is refused while Hide AI is off, as the command is. Each hourly aging run cuts the change history back to its limit and logs how many rows went.
The pre-tool hook refuses an agent's file write or shell call naming the global instruction, in every session and project. Hide's own writes go through the editor's checked save, follow a link to its target, and never overwrite an edit saved meanwhile; a pipe at the path is refused without blocking. A line with markup, a hidden character or a secret is never written, the same check a repeated request's line passes. OpenCode, Pi and omp still get the instruction when their start guidance came before the session-start capsule.
A press carries a token of the line and the file it was shown, so a reworded line or a changed file gets a new preview instead of a write. A line the operator already had is adopted and its Undo leaves it, and a press repeated after a lost answer converges. Ignored-memory lines come only from cards the operator said, a repeated turn raises no separate correction, ignored evidence says whether the card came in the list or in full, and the automatic mode passes over global instruction lines. The evidence reader shows only the operator's words, keys what it read by Project and runs one read at a time; Open file shows only on the core's machine.
The guard now reads a bare file name beside a state folder or run in one, compares names without case, follows a link at the file, refuses a call cut before it could be read, logs each refusal, and the OpenCode, Pi and omp plugins send a call naming the file to the helper with no guardrail on.
Follow a link at the global instruction only to an existing text file and never create through one, raise no correction for a card made at a repeat's turn, refuse a Memory tab recheck with Hide AI off in words, free the evidence read slot after a panic, and drop an unused evidence field.
This was referenced Oct 29, 2026
yansfil
added a commit
that referenced
this pull request
Oct 30, 2026
…e hooks (#1852) ## Summary The agent journey's `guidance_memory` cell failed for Codex CLI and OpenCode in the v1.0.4 release run while Claude Code passed, and the same build had passed it an attempt earlier. The journey seeds its one Memory card with `created_at_unix_ms: 1`, a card dated 1970. Since #1816, Memory ages cards: one quiet past the archive age is archived and leaves the hooks. So the first aging run during the journey (`cards.aged archived:[1]` in the run's `hided.log`) took the card away, and every agent that started after it was given no card; which agents that hit depended on when the run happened. The seed now dates the card at the moment it is made, as a real card is. This is test tooling only (`hide-memory/examples/journey_memory.rs`); no product code changes. 스크린샷 없음: 화면을 바꾸지 않는 journey 도구 수정입니다. ## Review - `hide-memory/examples/journey_memory.rs`: the batch's `created_at_unix_ms` is the current time; a clock before 1970 is refused with `clock_before_epoch` rather than defaulted. ## Evidence - Confirmed: release run attempt 2 at 4f9f8d9 failed `guidance_memory` for codex and opencode with "no assistant message carries" the card's token; Codex answered "I don't have the Project Memory card's title", and the run's `hided.log` shows `{"component":"memory","kind":"cards.aged",...,"archived":[1]}`. `hide-memory/src/store/upkeep.rs` `age_cards` reads a card's clock from `created_at_ms` when no aging clock or given time is newer. - Confirmed: the example builds (`scripts/verify-cargo.sh build -p hide-memory --example journey_memory`). - In progress: the release journey rerun with this seed; its result goes on the release record, not here.
yansfil
added a commit
that referenced
this pull request
Oct 30, 2026
… at the pin before blaming a release (#1862) Closes with-hide/hide-private#358 ## Summary #1816 (Memory aging) broke the agent journey's `guidance_memory` cell, but its pull request never ran the journey, and the nightly agent canary then filed five agent releases for Hide's own break (hide-private#341, #343-#346). Two fixes: - **Pull request CI runs the journey for product code.** A change to any crate's product code (`src/` outside test modules, `build.rs`, `Cargo.toml`) now plans the keyless `agent-journey` lane, which costs about 4.4 min on Linux plus 0.4 min on Windows. Every crate builds into a program the journey runs. The stand-in now also judges `guidance_memory`: it answers from the Memory index its start hook printed, using the fake model's own rule. - **The canary tells a release's break from Hide's.** When an agent's latest release misses a cell, the canary reruns that agent alone at its pinned version, on the same commit and only on the systems where it failed. If the pin passes, the issue goes against the release. If the pin fails too, one issue goes against Hide. With no pinned measurement the agent is marked `unknown` and nobody is blamed. 스크린샷 없음: CI 계획과 canary 스크립트만 바꾸며 화면이 없습니다. ## Review - **판단해 주세요**: crate 변경 PR마다 job 2개(Linux 약 4.4분, Windows forms 약 0.4분)가 늘어납니다. herdr-core 변경은 18 -> 20 jobs입니다. Windows forms는 스크립트만 시험하므로 crate 변경에서 빼는 것도 가능하지만, plan 출력 계약을 늘리지 않으려고 lane 하나로 두었습니다. - **조심해서 볼 파일**: - `web/e2e/shims/live-check.h`: stand-in이 이제 부팅 5초를 start hook보다 먼저 기다립니다. 바로 실행되던 SessionStart hook은 Hide가 pane을 연결하기 전에 `pane_not_connected`로 거부되어 Memory를 받지 못했습니다(아래 질문). - `scripts/agent-canary-record.py`: 놓친 셀이 누구 탓인지 가르는 부분(`verdicts`)입니다. `install` 실패는 릴리스 탓, pin도 같은 셀을 놓치면 Hide 탓, pinned 측정이 없거나 pinned 설치가 실패하면 `unknown`입니다. - `.github/workflows/agent-canary.yml`: `reruns` -> `pinned` -> `record` 흐름입니다. pinned 재실행이 cancelled면 record를 건너뛰고 다음 날 다시 잽니다. - **따로 남긴 것**: Hide가 pane을 연결하기 전에 SessionStart hook이 돌면 그 세션은 Memory index 없이 시작합니다. with-hide/hide-private#365로 남겼고, 이 PR은 고치지 않습니다. ## Evidence - **확인한 것**: stand-in 여정 Linux, workflow_dispatch로 실행했습니다. - 이 브랜치: run 40992711843 green이고, `guidance_memory`가 Claude Code와 Codex 모두 pass입니다. - #1852의 seed를 1970으로 되돌린 브랜치: run 40992748014 red이고, Codex가 `guidance_memory` fail입니다. hided.log에 `cards.aged … "archived":[1]`가 남았습니다. 즉 이 PR의 라우팅이었다면 #1816은 PR CI에서 빨갛게 떴을 것입니다. - **확인한 것**: fake model 여정을 `agents=codex`로 Linux에서 실행했습니다(run 40991943778 green, 약 5분). report의 `selected`는 `["codex"]`이고, Codex 12개 셀 모두 pass, 다른 agent는 `not measured`입니다. `--agents`가 붙은 lane 판정도 통과했습니다. - **확인한 것**: 스크립트 suite 729개 테스트 OK(policy lane과 같은 명령)입니다. 새 테스트: - `test_the_product_code_the_journey_runs_plans_the_journey_lane`(test 모듈은 제외) - canary의 release / Hide / unknown 판정과 재실행 대상 - `--agents` lane 판정 - "모든 miss를 릴리스 탓"으로 되돌리는 결함을 심으면 Hide 판정 테스트가 실패하는 것을 확인했습니다. - **확인하지 못한 것**: canary workflow 전체(`reruns` -> `pinned` -> `record`)는 실행하지 않았습니다. 브랜치에서 돌리면 hide-private의 실제 support record와 issue를 다시 쓰기 때문이며, 첫 실행은 main 병합 후의 일일 canary입니다. 각 조각(reusable workflow의 `agents`, `report-name` 입력과 record 판정)은 위 실행과 단위 테스트로만 확인했습니다. macOS stand-in과 Windows forms는 이 PR의 CI가 돌립니다.
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/memory-self-improve/prd.md(로컬 계약; 아래 Summary와 Evidence가 검토할 내용입니다) · 선행 #1779, #1780Summary
~/.hide/state/global-instruction.md, 4 KiB)를 운영자가 승인한 지시로 받습니다.제안 탭: 되풀이한 요청에서 나온 전역 지시 줄과 운영자 말 근거, 넣은 뒤 되돌리기와 다시 말함
Memory 탭: 합치기와 다시 확인이 남긴 변경 기록과 되돌리기, 60일 안 쓴 기억의 보관과 되살리기
Review
AGENTS.md등)에 링크하면, 그 이름을 담은 셸 호출은 읽기여도 막힙니다. 셸 호출은 읽기와 쓰기를 구분할 수 없기 때문입니다.hide-memory/src/store.rs,store/upkeep.rs- 운영자 Memory 저장소 스키마 21→22 마이그레이션(21 백업을 남김), failure path.herdr-core/src/global_instruction.rs- 모든 세션에 들어가는 파일 쓰기. 미리 보인 줄의 token이 맞을 때만 쓰고, 그사이 손으로 고친 저장은 덮지 않으며, 링크는 이미 있는.md/.txt로만 따라갑니다.hide-agent-hooks/src/global_guard.rs, OpenCode·Pi·omp 스크립트 - 모든 pre-tool 호출의 고빈도 경로. 이름이 없는 payload는 바이트 검색과 상태 폴더마다 링크 읽기 한 번으로 끝납니다.herdr-core/src/node_migration/copy.rs- 코어 이동이 링크된 전역 지시를 코어의 상한 읽기(4 KiB, UTF-8, 링크 재추적 없음)로 옮깁니다. 못 읽으면 남기고 진단만 씁니다.herdr-core/src/runtime/suggestion_evidence.rs- 근거 발췌 읽기는 lock 밖 worker에서 (workspace, row)별로 한 번에 하나만 돌고, panic은 읽지 못한 발췌로 떨어집니다.Evidence
sasu implement verify가 최종 head에서 PASS: workspace nextest 전체와 clippy-D warnings.remote_coreMemory 여정을 pinned Herdr로 로컬에서 통과.core_movelane은 로컬 디스크가 모자라 CI에만 맡깁니다.후속 개선 (Follow-up improvements)
python -c로 계산한 이름,cd ~/.hide && cd state, 256 KiB 이후에만 이름이 있는 payload, Claude Code PowerShell 도구 matcher..hide-new임시 파일 이름은 예측할 수 있습니다.from_card같은 세션 경우, 경로를 넣은 JS route decode, OpenCode 2·Pi 링크 경우.writing표시가 남는 crash 구간이 있고, 손으로 넣은 줄을 채택할 때 되돌리기 힌트가 없습니다.is_invisible목록 확장, 줄의>거절,trim_changes다시 확인 행, 두 클라이언트의 근거 슬롯 공유, 다시 확인 읽기의 순차 처리, 같은 batch 합치기 undo id, alias 재시도, receipt 상한.Verification record
agents/prd/memory-self-improve/prd.md(sha256 1ec0f473831342cddec15936561f70fbadf390d53016db2786a103bb212ae9c8)agents/runs/memory-self-improve/verification-report.jsonandagents/runs/memory-self-improve/verification-report.md; source fingerprint f5e066833570caae5a5621e62f7a1a93336d9ff0a96b58e8fb8fc072392b0bc4bash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)from_card해석 테스트, 링크 한 단계, B15/B12 테스트, B11 근사, B13 소급.may_name중복 검색, JS route decode 테스트, 링크를 평평하게 옮긴 기록(link_copied)..hide-new예측 가능 이름, PowerShell matcher.feat/memory-self-improve, basemain