Repository navigation
feat: discover nested AGENTS.md within trusted sources - #2110
Merged
Merged
Conversation
JAORMX
marked this pull request as ready for review
October 6, 2026 14:49
Retain scoped guidance for live sessions and inherit it in child forks, with configurable content and metadata budgets. Co-authored-by: Mecatl <[email protected]>
Bound instruction discovery using the configured metadata allowance, preserve successful guidance alongside safe failure warnings, and retain mapped child and fork context. Add factory and isolation regressions and clarify instruction lifetime documentation. Co-authored-by: Mecatl <[email protected]>
JAORMX
force-pushed
the
spike/agents-hierarchy-20261005
branch
from
October 7, 2026 07:52
683a44e to
a041bd2
Compare
Reuse the existing live writable-child scenario and verify a nested-only instruction through the resulting file and ordered child tool transcript. Co-authored-by: Mecatl <[email protected]>
Merged
2 tasks
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
Relates to #2090. Implements lazy nested AGENTS.md guidance within selected, admitted instruction sources. Main's intentional removal of ADRs, acceptance plans, and process scaffolding is preserved; none are restored.
Current head:
f46bd7742ddc2adf965d4b5aa158bbb15f8e7787. History is now three commits: the original 43 commits squashed into one, the review repairs, and the live-test extension. Rebased ontoe731897077c75b020190f0d7b6e0b78af15082f1.Behavior
harness_context.project_instruction_max_bytesdefaults to 65,536 bytes and supports higher configured values. Content, metadata, discovery, and warnings are bounded. Failures and omissions produce safe advisories without changing tool permissions.Review repairs
Live hierarchy coverage
Extended the existing writable-subagent live scenario in
e2e/subagent_writable_test.go; no new scenario or workflow. The expected output appears only in nestedAGENTS.md. The test checks the real child transcript for a successful input Read followed by a later Write, rejects manual instruction-file/search discovery, and verifies the exact output in the parent workspace.The extended scenario passed with
anthropic/claude-haiku-4.5through OpenRouter. The archived live transcript shows the child readingnested-child-guidance/input.txt, then writingnested-child-guidance/output.txtwith the nested-only marker. Thee2e-livelabel remains enabled.The test-only change passed
go test -tags=e2e -run '^$' ./e2e/...and tagged lint for new code. Full tagged-package lint also reports three pre-existingunconvertfindings ine2e/lease_exclusion_test.go; they were not altered.Verification
Passed locally on repair commit
a041bd2f8, before the live-test-only extension:task linttask testtask test:racetask docsmecademo: tool result, permission ask/approval, final result, and background result collection.Full gates used an identical short-path checkout because existing embedded Unix-socket tests reject the long development-worktree path. Initial aggregate lint/race attempts hit their 600-second limits while competing for resources; final sequential runs with bounded Go parallelism passed. No assertions were disabled or lint thresholds relaxed.
Independent spec, standards, test-adequacy, security, architecture, and reuse reviews completed. Follow-up reviews confirmed the remaining error-retention and alternate-placement findings were resolved.
PANEL: ship_blockers=0 important=0 advisory=0 reviewer_failures=0CI status
34 passed, 3 skipped, 2 failed; no pending checks. CI is not fully green. Regular Build, Lint, Test (race), Analysis, API compatibility, docs, standalone modules, MicroVM, and Kubernetes checks passed. Live Kubernetes/OpenRouter also passed.
temporarily unavailableresponse, so the existing assertion failed. This is not missing model tool use or a nested-guidance failure. No unrelated WebSearch changes or blind paid reruns were made.TestKindExecutionProductionPendingDeleteOutageRecoveryfailure recurred (listed=0,exact_code=not_found). The exact base commit already fails identically. The qualification test and lifecycle-store source are unchanged by this PR; its root cause needs a separate execution-provider investigation.No production deployment or PR merge performed.