Remove `WarnNearLimits` from the harness `Coder` capability

Merged
AD
2mo ago
+10-12

Coder no longer includes WarnNearLimits(max_context_fraction=0.9). Past 90% of the context window, that capability injects URGENT/CRITICAL warnings into the model's input as user turns. In long coding sessions, clai2 included, they are noise: they push the model to wrap up even when compaction or the host already manages context. ClearToolResults(max_fraction=0.7) still manages context. To keep the warnings, bind WarnNearLimits next to Coder:

Agent(model, capabilities=[Coder(), WarnNearLimits(max_context_fraction=0.9)])
  • coder/_capability.py: drop WarnNearLimits from the composition.
  • tests/harness/test_coder.py: update the expected member list.
  • Composition descriptions updated in docs/harness/coder.md, docs/harness/index.md, the harness and coder READMEs, the harness skill's CODING-AND-WORKSPACES.md, and the mirrored front-page example in README.md/docs/index.md (plus its tests/test_docs_parity.py marker).

No code has to change, so this has no compatibility impact under the version policy.

Local verification: ruff format --check and ruff check on the repo; pyright on the changed files; pytest tests/harness tests/test_docs_parity.py tests/clai2: 11,560 passed. The two tests/harness/ssh_workspace timeouts in that run were load from parallel suites, and that directory passes on its own (62 passed).

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver.
  • PR title is fit for the release changelog.