feat: raise agent instruction size limit

This commit is contained in:
2026-08-26 10:11:31 +09:00
parent 76ded1947d
commit 74d8ec48d2
5 changed files with 6 additions and 6 deletions

2
dist/cli.cjs vendored
View File

@@ -14511,7 +14511,7 @@ var import_yaml = __toESM(require_dist(), 1);
var GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.";
var CLAUDE_CONTENT = "@AGENTS.md\n";
var WARNING_BYTES = 26624;
var MAX_BYTES = 30720;
var MAX_BYTES = 32e3;
var SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
var HarnessError = class extends Error {
constructor(message) {

2
dist/index.cjs vendored
View File

@@ -14527,7 +14527,7 @@ var import_yaml = __toESM(require_dist(), 1);
var GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.";
var CLAUDE_CONTENT = "@AGENTS.md\n";
var WARNING_BYTES = 26624;
var MAX_BYTES = 30720;
var MAX_BYTES = 32e3;
var SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
var HarnessError = class extends Error {
constructor(message) {

View File

@@ -121,7 +121,7 @@ Use UTF-8 without BOM, LF line endings, and exactly one trailing newline. Refuse
Codex uses a 32 KiB default combined project-instruction limit. To leave room for possible nested guidance:
- Warn when generated `AGENTS.md` exceeds 26 KiB (26,624 bytes).
- Fail when it exceeds 30 KiB (30,720 bytes).
- Fail when it exceeds 32,000 bytes, leaving 768 bytes below Codex's default 32 KiB combined limit.
- Never solve an overflow by truncating content. Shorten or split the source rules deliberately.
## Commands

View File

@@ -23,7 +23,7 @@ import { parseDocument, stringify as stringifyYaml } from "yaml";
const GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.";
const CLAUDE_CONTENT = "@AGENTS.md\n";
const WARNING_BYTES = 26_624;
const MAX_BYTES = 30_720;
const MAX_BYTES = 32_000;
const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
export class HarnessError extends Error {

View File

@@ -357,11 +357,11 @@ stack:
test("fails instead of truncating output above the hard size limit", async (t) => {
const { harnessRoot, appRoot } = await createFixture(t);
await writeText(path.join(appRoot, ".agent", "project.md"), `## Project Rule\n\n${"x".repeat(31_000)}\n`);
await writeText(path.join(appRoot, ".agent", "project.md"), `## Project Rule\n\n${"x".repeat(33_000)}\n`);
await assert.rejects(
() => planProject(harnessRoot, "sample-front"),
/exceeds the 30720-byte limit/,
/exceeds the 32000-byte limit/,
);
});