Teknium
f80381c456
feat(prompt): scale context-file cap to model window + point agent at truncated file ( #47846 )
...
Context files (AGENTS.md, CLAUDE.md, .hermes.md, .cursorrules, SOUL.md) were
hard-capped at a flat 20K chars before head/tail truncation. Among the agent
harnesses we track, only Codex caps project docs at all (32 KiB); Claude Code,
OpenCode, and Cline load them whole. The flat 20K predates large context
windows and silently truncates real-world AGENTS.md files.
B — dynamic cap: when context_file_max_chars is unset (now the shipped
default), the cap scales with the model's context window
(ctx_tokens * 4 * 0.06, floor 20K, ceiling 500K). Small-context models stay at
the historical 20K; a 200K model gets 48K; large models stop truncating real
docs. An explicit context_file_max_chars still wins. Context length is resolved
once per conversation (stable -> prompt cache untouched).
C — when truncation does happen, the marker now names the concrete file path
and tells the agent to read_file it for the full content.
Validation: 154 targeted tests + full agent/ + hermes_cli/ + test_config
(0 failures); E2E against a real 60K AGENTS.md confirms small windows truncate
with the path-bearing marker, large windows load whole, and the system prompt
is byte-stable across rebuilds.
2026-06-17 05:40:26 -07:00
..
2026-05-30 02:08:36 -07:00
2026-06-17 05:13:12 -07:00
2026-02-26 13:54:20 +03:00
2026-06-14 02:09:16 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:36:38 -07:00
2026-06-17 13:20:29 +05:30
2026-05-29 01:23:06 -07:00
2026-06-10 20:45:16 -07:00
2026-06-10 20:45:16 -07:00
2026-06-07 01:40:50 -07:00
2026-05-28 22:26:25 -07:00
2026-04-19 22:43:09 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 00:28:02 -07:00
2026-06-16 06:23:24 -07:00
2026-05-28 22:26:25 -07:00
2026-06-16 06:23:24 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 02:09:16 -07:00
2026-06-07 02:02:40 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 10:14:38 -07:00
2026-06-15 05:25:17 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 02:19:13 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:09 -07:00
2026-05-29 02:02:25 -07:00
2026-06-11 19:50:08 -05:00
2026-06-11 23:03:52 -07:00
2026-06-12 16:47:15 -07:00
2026-06-07 22:06:48 -07:00
2026-06-07 22:30:02 -07:00
2026-06-12 15:41:57 -07:00
2026-05-16 17:18:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 01:14:28 -07:00
2026-06-07 22:09:45 -07:00
2026-05-27 22:14:53 -07:00
2026-06-11 13:57:13 -07:00
2026-06-12 16:26:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 19:16:46 -05:00
2026-06-14 03:20:21 -07:00
2026-05-16 02:24:48 -07:00
2026-04-19 18:12:55 -07:00
2026-05-29 02:24:48 -07:00
2026-06-12 01:06:46 -07:00
2026-06-06 13:18:18 +05:30
2026-06-12 08:51:10 +00:00
2026-06-06 13:18:18 +05:30
2026-06-12 08:51:10 +00:00
2026-05-28 22:26:25 -07:00
2026-04-30 10:31:47 -07:00
2026-06-17 05:40:05 -07:00
2026-05-10 06:44:53 -07:00
2026-05-28 22:26:25 -07:00
2026-06-17 05:20:32 -07:00
2026-06-13 02:01:09 -07:00
2026-05-21 07:48:53 -07:00
2026-06-07 21:50:57 -07:00
2026-05-17 02:29:41 -07:00
2026-04-20 22:14:29 -07:00
2026-03-15 20:21:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 07:46:34 -07:00
2026-06-10 12:39:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 14:03:37 +10:00
2026-05-25 03:40:47 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 11:29:24 +10:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 20:04:57 -07:00
2026-05-28 22:26:25 -07:00
2026-06-13 13:47:08 -07:00
2026-04-24 03:40:00 -07:00
2026-06-03 12:00:27 -07:00
2026-04-21 21:30:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 18:33:20 -07:00
2026-05-28 00:20:11 -07:00
2026-04-29 06:35:42 -07:00
2026-05-23 17:38:19 -07:00
2026-06-05 10:18:10 +10:00
2026-05-11 16:49:13 -07:00
2026-06-08 02:18:59 -07:00
2026-06-13 04:51:44 -07:00
2026-06-08 02:18:59 -07:00
2026-06-16 10:37:37 -07:00
2026-05-28 22:26:25 -07:00
2026-04-07 22:23:28 -07:00
2026-06-04 05:53:35 -07:00
2026-05-28 22:26:25 -07:00
2026-04-24 03:00:33 -07:00
2026-06-14 13:50:36 -07:00
2026-05-29 23:45:05 -07:00
2026-06-13 05:51:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 13:18:18 +05:30
2026-06-12 08:51:10 +00:00
2026-06-04 01:19:28 +05:30
2026-04-26 04:53:42 -07:00
2026-06-07 08:36:48 -07:00
2026-05-05 10:13:34 -07:00
2026-05-28 22:26:25 -07:00
2026-05-12 20:49:20 -07:00
2026-06-17 05:40:26 -07:00
2026-05-28 22:26:25 -07:00
2026-04-21 05:52:46 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 05:31:21 -07:00
2026-06-11 13:57:13 -07:00
2026-06-02 20:23:09 +00:00
2026-05-24 18:10:47 -07:00
2026-05-30 02:38:59 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-29 21:07:47 -07:00
2026-05-21 16:40:04 +05:30
2026-06-16 13:08:34 -07:00
2026-06-13 21:14:32 -07:00
2026-06-10 20:21:38 -05:00
2026-05-18 10:53:08 -07:00
2026-05-28 22:26:25 -07:00
2026-04-20 20:53:51 -07:00
2026-05-28 22:26:25 -07:00
2026-06-11 13:57:13 -07:00
2026-06-16 09:50:17 -05:00
2026-06-17 05:40:26 -07:00
2026-05-05 04:33:38 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 14:52:24 -07:00
2026-05-19 00:12:12 -07:00
2026-05-13 06:46:23 -07:00
2026-05-25 01:41:19 -07:00
2026-05-24 18:04:54 -07:00
2026-06-07 22:17:35 -07:00
2026-06-07 22:42:05 -07:00
2026-05-08 14:55:40 -07:00
2026-05-29 17:24:30 -07:00
2026-06-10 00:24:06 -07:00
2026-05-13 16:39:41 -07:00
2026-05-04 05:05:43 -07:00
2026-05-24 15:01:28 -07:00