Repository navigation
Landscape-sweep worker: pass an intent on every ctx_execute; keep ctx_search at its default limit (containment M3/M5) - #403
Merged
seathatflowsinourveins merged 1 commit intoSep 27, 2026
Conversation
…_search at its default limit The token lane counted smoke 3's tool results (wf_c7bc3ee8-c16). Fetch routing was fixed by #398 (3 of 3 through ctx_fetch_and_index), but containment was not: 45 of 134 results were over 5 KB, carrying 79.6% of result bytes. ctx_execute had 27 of 52 over 5 KB and ctx_search 11 of 20. The likely causes are ctx_execute without `intent` and high ctx_search limits. The #381 targets are M3 at no more than 1 non-exception result over 5 KB per child with no more than 20% of bytes, and M5 at no more than 10% of ctx results over 5 KB. The fix uses context-mode's own contract. The ctx_execute and ctx_batch_execute `intent` parameter: "When provided and output is large (>5KB), indexes output into knowledge base and returns section titles + previews — not full content". ctx_search's default limit is 3. The worker body (adoption/agents/claude/landscape-sweep-worker.md and its byte-identical .claude/agents copy) now requires an intent on every ctx_execute or ctx_batch_execute call, ctx_search at its default limit with specific queries, and derived answers only. The token lane owns the host token-lanes block (the same rule) and the enforcement fallback: a PreToolUse refusal of ctx_execute without intent, used only if the next one-layer smoke shows prose alone does not move M3/M5. Tests: test_install_claude_profile + test_landscape_sweep_harness OK. validate.py passed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qwXNtFyUhY5x2dtrm7tG5
seathatflowsinourveins
deleted the
claude/sweep-worker-containment-20260927
branch
September 27, 2026 14:54
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.
What
A follow-up to #398, on output containment for the landscape sweep's Claude workers.
The token lane's per-agent count on smoke 3 (
wf_c7bc3ee8-c16) found two things:ctx_fetch_and_index.ctx_executehad 27 of 52 over 5 KB, andctx_searchhad 11 of 20.The #381 targets are:
Fix, using context-mode's own contract. The worker body now has a Context rule:
intenton everyctx_executeandctx_batch_executecall;ctx_searchat its default limit of 3, with specific queries;Per its schema, the
intentparameter makes output over about 5 KB get "indexed into knowledge base and returns section titles + previews — not full content".The change is in
adoption/agents/claude/landscape-sweep-worker.mdand its byte-identical.claude/agents/copy.The token lane owns the host token-lanes block, which carries the same rule, and the enforcement fallback: a PreToolUse refusal of
ctx_executewithoutintent. That ships only if the next one-layer smoke shows the prose rule alone does not bring M3/M5 to target.Verification
python3 -m unittest tests.test_install_claude_profile tests.test_landscape_sweep_harness: 167 run, OK. This includes the project-scope byte-identity test.python3 scripts/validate.py: passed.SOTA sources
ctx_executeandctx_batch_executetool schemas: theintentparameter indexes output over ~5 KB and returns previews. Thectx_searchdefaultlimitis 3.🤖 Generated with Claude Code
https://claude.ai/code/session_012qwXNtFyUhY5x2dtrm7tG5