Repository navigation
Replies: 1 comment
|
Failing open on a probe error is the kind of boundary bug that only shows up under adversarial conditions, since nothing in normal use ever trips it. Nice catch. The same class of failure applies to any instruction file an agent loads by discovery: the trust boundary moves and the agent never notices. I run agent-sandbox, we scan agents for prompt injection in an isolated sandbox and hand back a pass/fail report; instruction-file and workspace-content injection is one of the payload classes. First cohort is free if you want a harness-driven agent run through it: https://agent.beehivewebstudio.com |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Agent instruction project-root discovery currently treats every root-marker probe failure as if the marker were absent. If an inner project's marker is temporarily unavailable, discovery continues upward and can select an outer repository as the root, causing instruction files from that ancestor project to be loaded into the current session.
Reproduction
.gitand anAGENTS.mdcontainingouter project rule..gitandAGENTS.mdcontaininginner project rule.ctx.fs..gitthrow, while the outer.gitremains readable.On current
master, the derived workspace context contains bothouter project ruleandinner project rule, and the provider reads the outerAGENTS.md. The new regression test fails on the old implementation with exactly that leaked ancestor instruction.Root cause
existsAsMarker()returns a boolean. Its catch path callssignal.throwIfAborted()and then returnsfalse, erasing the difference between confirmed absence and provider/host I/O failure.findProjectRoot()therefore keeps walking past a directory whose project-boundary status is unknown.Impact
Proposed fix
present,absent, andunavailablestates.ENOENTandENOTDIRas confirmed absence; retain other failures as unavailable.Patch
agent/agent-instructions-root-marker-fail-closedVerification
git diff --checkpassed.All reactions