Repository navigation
fix: register a spawned child once it takes its launched brief - #1
Merged
Merged
Conversation
A spawn whose brief rode the agent's start waited for the engine to read the agent ready for input before it registered the child. An agent that took its launched prompt works on it at once and reads as launching until that turn ends, so the spawn waited out the whole 30 s, and every letter the child sent to its parent meanwhile was refused participant_unavailable. The spawn now waits only until the agent is seen taking its brief: ready for input, or working (ladder::took_launch). The brief's record clock still restarts there, and the child is registered right after. A child the spawn has not bound yet (its session still to show) is now refused participant_registering, whose next action says to wait a few seconds and run the same command again, for request send parent, agent show here and ask-human alike, on this machine and on a device.
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
A spawned worker's first letters to its parent were refused
participant_unavailablefor about 30 s.When the brief rides the agent's start (
claude-code,codex,grok,omp,antigravity), the spawn waited for input readinessbefore registering the child; an agent working on that brief reads as launching until its turn ends, so the spawn
waited out
BRIEF_READY_WAIT(30 s) with the child unregistered.Now the spawn waits only until the agent is seen taking its brief (ready, or working), restarts the brief's record
clock there and registers the child at once. A child its spawn has not bound yet (the short wait for its session)
is refused a new, transient
participant_registering: wait a few seconds and run the same command again.Review
participant_registering;request send parent,agent show hereandask-humanall answer it, since all three ask
coordination::here.hide guidenames it besideno_parent.workingduring a launch counts as the brief taken. Checked against Claude Code's screen rules only(
workingreads from its turn spinner, never before the prompt is submitted);codex,grok,ompandantigravityunchecked.brief_not_submitted, an identity wait)keeps that pane answering
participant_registeringuntil the spawn binds it or the pane closes.hide-core/src/coordination/executor.rs- spawn order: the launched-brief wait ends atworking, then identity wait,BindChild,Completeas before; typed briefs keepladder::ready.hide-core/src/delivery/ladder.rs- one wait loop (until), two predicates:ready(unchanged, also
worktree_control) andtook_launch; same 250 ms poll and deadline.hide-core/src/coordination/mod.rs-registeringmatches an unbound spawn by agent name,placed pane and child machine (
spawn_machine), a device pane alike; no letter is held, nothing waits.hided/src/cli_contract.rs,contracts/hide-cli.json,hided/src/server.rs- the reason infour specs and its next action.
registeringruns only where a caller is refused, one scan of the spawns.Runtime::spawn_pane_idreads a spawn with nomachineas the core's node, while the spawnplaces it on its caller's machine (
spawn_machine); left as is here. Worth a follow-up?registeringcould also guard a reused pane byspawn.terminal, asspawn_observationdoes;here()sees only the ledger and the caller, andask-humanruns inside the ledgerapply, so that needs the caller's terminal passed in.
Tests
launched_brief.rs, on the local harness inbeside_spawn.rs)and through
prepare_delivery; a unit test ofcoordination::here(local, device, reused pane id).spawn has not bound answered
participant_unavailable. Planted: withexecutor.rs,ladder.rsandcoordination/mod.rsatorigin/mainboth runtime tests fail, the spawn loggingbrief.launch_ready_unseen Late("readiness Launching, status working after 30s"), the operator's log line.--libtests, which the repeat lanedoes not select (it repeats
tests/itmodules and e2e specs).Evidence
isolation,
--parent here, launched brief): its first call,hide request send parent --kind progress,answered
ok; the spawn answered on its first attempt and the start step took 9.1 s; the candidate's corelog has
brief.launchedand nobrief.launch_ready_unseen.startstep alone, and oneBash(hide request send:*)allow rule in the run's private Claude Code settings.verifyon 45d3527 passed: rust workspace (nextest), windows check, web e2e linux1-6/6 (the family fixture in
engine-fixture.tsincluded), windows e2e, agent journey stand-ins, policy checks.bash scripts/verify-cargo.sh lintpasses; localtest --no-fail-faston 93f90a6:8473 passed, 2 failed, both named below.
runtime::tests::missions::a_live_binding_during_registration_save_keeps_the_newly_ended_registration_and_spawnfails under the full local
cargo test(a 5 srecv_timeout); one full hide-core run with these three files atorigin/mainand the new tests skipped failed it in 3 of 3 runs; alone it passes 5/5.checkis red locally.runtime::tests::home_retire::an_unreadable_marker_keeps_the_project_and_asks_only_oncefailed in 3 of 7 full local runs (label
Homeforhide): its barrierhome_retiringis set at the request(
home_retire.rs:60), before the worker applies the refusal; alone 3/3, on no path this diff touches.hide-holder'sa_flooded_holder_keeps_within_its_budget_once_it_gave_freed_pages_backfailed once and passed once (6.28 MiB against 6 MiB); hide-holder is untouched here.
hereunit test covers its address);bash scripts/verify-web.shwas not run locally;web/e2e/engine-fixture.tsis unchanged, since itspanel-started parent has no spawn record and still answers
participant_unavailable(CI's web e2e passed).Verification record
0852106a9, head45d352704(65eb1adc4fix,93f90a635contract export,45d352704guide line).launch_ready_unseen;participant_unavailable).check-no-attribution.py,check-no-workstation-identity.sh,check-harness-ignore-anchor.sh,check-timed-waits.py,check-capability-readers-off-lock.shpass.python3 scripts/merge-order.py --branch fix/spawn-letter-window: Stay as you are.