Skip to content

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 into
mainfrom
claude/sweep-worker-containment-20260927
Sep 27, 2026
Merged

seathatflowsinourveins merged 1 commit into
mainfrom
claude/sweep-worker-containment-20260927

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Owner

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:

  • Fetch routing is fixed: WebFetch 0, and 3 of 3 fetches went through ctx_fetch_and_index.
  • Containment is not:
    • 45 of 134 tool results were over 5 KB, carrying 79.6% of result bytes;
    • ctx_execute had 27 of 52 over 5 KB, and ctx_search had 11 of 20.

The #381 targets are:

  • M3: at most 1 non-exception result over 5 KB per child, and at most 20% of bytes;
  • M5: at most 10% of ctx results over 5 KB.

Fix, using context-mode's own contract. The worker body now has a Context rule:

  • pass an intent on every ctx_execute and ctx_batch_execute call;
  • read with ctx_search at its default limit of 3, with specific queries;
  • print derived answers only.

Per its schema, the intent parameter 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.md and 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_execute without intent. 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.
  • Integration: the next one-layer smoke, measured with the token lane's counter. That smoke runs under the user's Gate A, which holds the full sweep anyway.

SOTA sources

🤖 Generated with Claude Code

https://claude.ai/code/session_012qwXNtFyUhY5x2dtrm7tG5

…_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 seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 27, 2026
@seathatflowsinourveins
seathatflowsinourveins merged commit a42f0f7 into main Sep 27, 2026
24 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/sweep-worker-containment-20260927 branch September 27, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant