-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: AGENTS.md bootstrap truncation may omit scoped instructions #82920
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.maintainerMaintainer-authored PRMaintainer-authored PR
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.maintainerMaintainer-authored PRMaintainer-authored PR
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Oversized workspace
AGENTS.mdbootstrap files are truncated before injected context, so required scoped instructions in the omitted middle of the file may not reach subagents.Steps to reproduce
AGENTS.mdlarger than the default bootstrap injection cap.Expected behavior
Subagents should receive a compact representation of required
AGENTS.mdpolicy even when the raw file exceeds the injected-context character budget.Actual behavior
The bootstrap builder caps each workspace bootstrap file and logs truncation. For
AGENTS.md, middle policy can be omitted from injected context when the file exceeds the cap.OpenClaw version
NOT_ENOUGH_INFO
Operating system
NOT_ENOUGH_INFO
Install method
pnpm dev
Model
NOT_ENOUGH_INFO
Provider / routing chain
OpenClaw embedded agent/subagent bootstrap context injection
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs, screenshots, and evidence
Impact and severity
Affected: Subagents and embedded agent sessions that rely on workspace
AGENTS.mdbootstrap policy.Severity: Medium; incorrect reviews or fixes are possible when required scoped policy is omitted.
Frequency: Observed 34 matching truncation log lines in the captured evidence.
Consequence: Agents may act without required scoped instructions until they manually read the source file.
Additional information
A focused regression test was added for a required scoped instruction in the middle of oversized
AGENTS.mdcontent. Local execution was blocked by Windowsspawn EPERMandesbuildpostinstallspawnSync ... node.exe EPERM; patch hygiene passed withgit diff --check.