Repository navigation
fix: keep an agent opened beside its caller out of a parent's care, and let a child write to its parent - #2402
Merged
Merged
Conversation
…nd let a child write to its parent A spawn with --beside and --parent is refused beside_with_parent before anything is created: an agent beside its caller is the operator's root, and a supervised child opens in a tab of its own. hide request send parent reaches the sender's own parent, refused no_parent when none answers for it, because a child is never told its parent's id. The session-start table and spawn help no longer suggest --parent here beside.
… beside_with_parent allows The family e2e fixture spawned its child with --parent here --beside, now refused; the child opens in a tab of its own and the fixture finds it by the pane its spawn answers. spawnChild loses its beside option, which no spec passed. The mission worker item fixture's reviewer stays beside its caller, so the fake engine makes no tab, without a parent, which those tests do not read.
…-status specs The family fixture's child now opens in a tab of its own. ask-human focuses that tab to read the child's pane head, and sidebar-status starts the child working before the parent's unseen turn, since typing the child's screen shows its tab and reads the parent's turn.
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 12, 2026
… open (with-hide#2473) Related: follows with-hide#2470 and with-hide#2469 (both merged). Paired private docs: with-hide/hide-private#879. ## Summary Some questions in `나를 기다리는 것` were settled without anyone answering them in the session. Another agent relayed the operator's decision, or the agent did the thing itself. They stayed open anyway and kept the task in Needs You. Hide AI may now fold such a question, never delete it. It moves under `정리됨 N` below the list, with a one-line reason, and one press of `다시 열기` brings it back for good. A step only the operator can take (sign-in, approval, permission, typed information) is marked when the question is listed. Hide AI never folds it, and a parent's letter no longer closes it; only the operator's own answer does. Questions recorded before this change carry no mark and are never folded.  Look at the lines under `정리됨 2`: the question in the subtle colour, the reason under it, `다시 열기` at the right. ## Review - **Decide**: an approval the agent reserves for the operator ("only your OK is left") counts as the operator's own step, so it never folds. On the sample this keeps one settled merge question (fc86b2) in Needs You. - **Decide**: the fold is shown closed as `정리됨 N` under `나를 기다리는 것`, only in the session record; rows and the pane head ignore folded lines. - **Risky files**: `hide-core/src/links/ledger_store.rs` - the close and fold updates in one turn-end transaction; schema 16 adds two nullable columns to `ledger_missed`. - **Risky files**: `hide-core/src/labels/context_label.rs` - END prompt v27 adds `operator_only` on each missed item and `reason` on each resolved id. - **Cost**: no new model call. The existing END call returns two more fields, and the turn-end write runs one more UPDATE. ## Tests - **Layer**: unit, against the real ledger store (`links/ledger_store_tests.rs`), plus a vitest render of the session record. - **Fixture**: the e2e stand-in provider now answers every missed line with `operator_only: false` and every resolution with `reason: ""` (`web/e2e/pane-fixture.ts`); without them the v27 schema refused its answers and the session-record e2e tests saw no questions. - **Catches**: a parent's letter closing the operator's own step; a fold of an unmarked or operator-only line; a reopened line folding again. Dropping the `operator_only` guard from the parent-answer close (closing every line) fails both new ledger tests. - **Repeat**: the two new ledger tests and with-hide#2470's bell test 5 times locally, all green. - **Waits**: none. ## Evidence - **Verified**: `verify` green on 1ff2732 (all lanes, web e2e Linux 6/6 and Windows, desktop e2e Windows). The first run's e2e reds were the stand-in answers the v27 schema refused, fixed in the fixture. - **Verified**: after merging main (with-hide#2469 included): `hide-core` filtered nextest 350/350; web typecheck, lint, and vitest for SessionRecord, agentRow, PaneHeaderBand and i18n (159/159); design contract. - **Verified**: the v27 prompt on haiku, with production flags, over the hand-labelled sample. The person-step mark caught 3 of 3 operator steps and wrongly marked 2 of 12 other questions. That error leaves a question held, never closed. - **Not verified**: no run on an installed build. The measurement rebuilds each turn from the session file (last 3,500 characters, at most 5 later turns), and 9 questions were not listed again in that context. - **Not verified**: the full Rust suite and the other lanes run in CI only. `verify-web.sh`'s install step is refused locally by pnpm 12 (ignored build scripts), so its steps were run one by one. <details><summary>Measured on the labelled sample (open questions of 11-11/12 with later turns: 20 stale, 3 live, labelled by hand)</summary> | | stale cleared | live lost | | --- | --- | --- | | before (with-hide#2470 not merged) | 0/20 | 0/3 | | with-hide#2470's rule alone, no relisting | 15/20 | 2/3 (both operator steps) | | with-hide#2470 + this, v27 judgment (one run) | 8/20 (7 closed, 1 folded) | 0/3 | Needs You over the 16 root sessions holding questions of 11-11/12, at the copy's last turn: | | Needs You | false | live lost | | --- | --- | --- | --- | | before | 16 | 2 (fc86b2, dfc3c6), f89171 unclear | 0 | | after | 16 | 2 (fc86b2, dfc3c6), f89171 unclear | 0 | - fc86b2: the judgment read it as settled with a reason on 3 turns ("with-hide#2402 already merged"), but the agent had reserved the merge OK for the operator, so the mark keeps it. - dfc3c6: the judgment lists it again as still waiting on all 5 later turns; nothing in the session settles it. - A narrower mark (excluding merge decisions) was tried. It still marked fc86b2 and missed the 9 GB delete permission, so it was not kept. </details> <details><summary>More evidence</summary>  Closed at first, light theme. </details>
This was referenced Nov 14, 2026
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.
Summary
An agent opened beside its caller (
hide agent spawn --beside) could also be made that caller's child with--parent here, and the session-start text told agents to do exactly that.The operator reads a pane beside theirs as "just opened there", not as a supervised child, so the screen and the lineage disagreed.
The same child then could not report: it is never told its parent's id, guessed
request send parent, and gottarget_unavailable.Now
--besidewith--parentis refusedbeside_with_parentbefore anything is created, so an agent beside its caller is always the operator's root and a supervised child always opens in its own tab.hide request send parent ...reaches the sender's own parent, and a sender with none is refusedno_parent.No screenshot: no screen changes; the change is in spawn admission, letter addressing and agent-facing text.
Review
--parent here --beside: placement now decides responsibility.parentas a letter target wins over an agent that registered under the nameparent.hide-core/src/runtime/delivery.rs-prepare_deliveryruns under the runtime mutex; the new step reads the in-memory ledger only, no I/O.hide-core/src/coordination/executor.rs- the refusal sits with the other argument checks, before the ledger is read or anything reserved.coordination::here) only for letters addressed toparent.Agents already running beside a parent keep that parent: existing spawn records are untouched, and the beside relocation exemption still holds them in place across restarts.
Tests
runtime::tests::beside_spawnover the fake device engine;runtime::delivery::testsover the real delivery worker and ledger file).--besidewith a parent (a_beside_spawn_with_a_parent_creates_nothing), and aparenttarget that is not resolved or resolves to the wrong agent, plus the retry of the same letter (a_letter_to_parent_reaches_the_senders_own_parent). Planted defects (refusal disabled, keyword not matched) failed both.web/e2e/engine-fixture.ts, 16 specs) spawned its child with--parent here --beside, now refused; its child opens in a tab of its own and is found by the pane its spawn answers, andfixture.tabis the parent's.spawnChilddrops its unusedbesideoption.mission_worker_item's reviewer stays beside its Conductor so the fake engine makes no tab, now without a parent, which those tests do not read.beside_spawnand the new letter test, 20 runs locally, all green.Evidence
hide-corebeside/parent/delivery filter 136/136;hidedagent_cli/cli_contract/refusal/guide filter 52/52;hide-agent-hooksruntime/workspace_context 20/20;cargo fmt --check; clippy-D warningson hide-core, hided and hide-agent-hooks.contracts/hide-cli.jsonregenerated from this build (addsbeside_with_parentandno_parent).timed out ... waiting for the restarted core's engine and saved Workspace) fail on main's push run too and are not from this change.verify-cargo.sh testlane is left to CI; Windows and Linux lanes are left to CI (no platform code changed).