Skip to content

harness: AGENTS.md is held to its size today - #67

Merged
lneto merged 1 commit into
masterfrom
claude_harness_e373af1
Nov 27, 2026
Merged

lneto merged 1 commit into
masterfrom
claude_harness_e373af1

Conversation

@lneto

@lneto lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Every session and every workflow agent that loads CLAUDE.md on this checkout reads AGENTS.md before its first turn, and nothing kept the file from growing.

The harness/ mount moves to luainkernel/harness@e373af1, which carries luainkernel/harness#52: tools/checks/context-budget.sh, which the mount's pre-commit runs on a commit and in the Checks workflow, fails a change that takes AGENTS.md past the ceiling the budget key of .agents/harness.conf names. This pull request sets that key to 3647, the file's size today.

The maintainer's answer in luainkernel/harness#6 (D172 D) sets each ceiling after a first trim, and that trim removes only the passages that harness/AGENTS.md and Lunatik's AGENTS.md both carry. This repository's AGENTS.md is not one of those two files, so the trim takes nothing from it, and its ceiling after the trim is its size now:

$ printf x >> AGENTS.md && git add AGENTS.md && bash harness/tools/checks/context-budget.sh
AGENTS.md: 3648 bytes, past its ceiling of 3647; a lesson that needs room moves an older passage to the check, the skill or the path rule that holds its subject

Nothing a script calls changes.

The `harness/` mount moves to luainkernel/harness@e373af1, which carries
luainkernel/harness#52: tools/checks/context-budget.sh, which the
mount's pre-commit runs here and in the Checks workflow, fails a commit
that takes the AGENTS.md at the top of a checkout past the ceiling the
budget key of .agents/harness.conf names. D172 D on luainkernel/harness#6
trims only what harness/AGENTS.md and Lunatik's say twice, so this file
loses nothing and its ceiling is its size, 3647 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto lneto added the complexity: small One line or one file, with a trivial or existing test label Nov 27, 2026
@lneto

lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Note

This comment was written by an LLM, not a human.

Proof at head bdd4d06, in a worktree of this branch with the mount at e373af1. Before, no budget key, and the check reads nothing for this repository. After, the file at its size passes and one byte past it fails, the byte planted as a patch and reverted with git apply -R:

$ git add .agents/harness.conf harness && bash harness/tools/checks/context-budget.sh; echo "at 3647: exit $?"
at 3647: exit 0
$ printf 'x' >> AGENTS.md && git diff AGENTS.md > <patch> && git add AGENTS.md && bash harness/tools/checks/context-budget.sh; echo "at 3648: exit $?"
AGENTS.md: 3648 bytes, past its ceiling of 3647; a lesson that needs room moves an older passage to the check, the skill or the path rule that holds its subject
at 3648: exit 1
$ git restore --staged AGENTS.md && git apply -R <patch> && git status --short
M  .agents/harness.conf
M  harness

The commit itself went through the mount's pre-commit, which runs the check, at 3647 bytes.

@lneto
lneto merged commit 17d7004 into master Nov 27, 2026
2 checks passed
@lneto
lneto deleted the claude_harness_e373af1 branch November 27, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: small One line or one file, with a trivial or existing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant