Repository navigation
feat(runtime): tell sub-agents a parent is waiting and how to answer (AP1) - #235
Merged
lg2m merged 2 commits intoOct 2, 2026
Merged
Conversation
A model-spawned child got the root prompt verbatim, including "implement requested changes rather than stopping at analysis". It has no user, so the exception never applied and a read child kept reading. Nothing told it that only its final reply reaches a waiting parent, or when to stop. Child task runs now get a Sub-agent section: a parent is waiting; stop once you can answer; answer first, then path:line evidence, then open questions; do not re-read what is in context. Read children drop the implement-instead line and are told they cannot change files. The section is keyed in the prompt-prefix cache by being a child, so a read-only root is unchanged. Audit children keep their fixed brief and JSON reply, and a user's prompt in a child session gets the ordinary prompt. The parent's delegation guidance and the spawn_agent task description ask for a question, a purpose and an answer shape. AGENT_PROMPT_VERSION 14 -> 15. DESCRIPTOR_VERSION is unchanged; the golden digest moves only because the descriptor embeds the prompt version. AP1 of docs/plans/autonomous-core.md (ADR-0054 § 5). Linear: ENG-989
… brief guidance The golden test hashes the root prompt with the new bullet removed, and the spawn_agent schema with the old task text restored, against 356092a. Two planted edits made it fail. Adds a read-only root test and the architecture.md root request (review follow-up). Linear: ENG-989
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 1, 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.
Slice AP1 of
autonomous-core.md(ADR-0054 § 5) · Linear ENG-989 · Base: #233 (AP2), on #232.What changes for users
Sub-agents are told what they are for. Until now a spawned child got the root prompt word for word, including "Implement requested changes rather than stopping at analysis unless the user requested analysis-only work." A child has no user, so the exception never applied, and a read-only child kept reading. Over 30 days of the session store, 30 of 74 children that ran 64 or more calls said nothing until their final turn.
Child task runs now get a
Sub-agent:section:Parents get one new delegation bullet, and the
spawn_agenttaskdescription now asks for the question, what the answer is for, and the answer shape.Design
PromptPrefixKey.subagent(Read/Write/ none), so a read-only root is unchanged. That case is tested.depth > 0, it is not user-initiated, and its purpose isTask(sessions/execution.rs). Excluded:AGENT_PROMPT_VERSIONgoes 14 → 15.DESCRIPTOR_VERSIONis unchanged. The golden descriptor digest moves only because the descriptor embeds the prompt version; the encoding is the same.Verification
subagent_prompts_say_a_parent_is_waiting_and_read_children_drop_the_implement_linechecks that the child prompts differ from the root only by the section and the removed line.a_root_prompt_and_tools_change_only_by_the_brief_guidanceis a golden test against version 14 (356092a). With the new bullet removed and the oldtasktext restored, the root prompt and thespawn_agentschema hash to the base values, and every built-in declaration is unchanged. Two planted one-character edits each made it fail.a_read_only_root_keeps_the_implement_line_and_has_no_subagent_section.delegation_guidance_asks_for_a_question_a_purpose_and_an_answer_shape.cargo test --workspaceon the stacked branch (AP2 + AP1): 2012 passed, 0 failed. Clippy (--all-targets --all-features -D warnings) and fmt are clean.plan_compile, 4 × 2 000 iterations: 24.9–25.2 µs before, 25.0–26.0 µs after, within noise.architecture.md). Both are fixed in3376d27.Compatibility
docs/design/architecture.mddescribes the new key and the section, with a root request row inprogress/root.md.