liuhao1024
a9e56c048a
fix(compression): anchor codex app-server preflight on reported usage
...
The codex_app_server runtime bypasses the conversation loop, so the
usage-anchored context accounting captured there never ran: agent._usage_anchor
stayed None forever. Every preflight estimate therefore fell back to the rough
mirror-transcript heuristic, which is deliberately never compacted on this
runtime (_record_codex_app_server_compaction preserves the mirror), so it grows
monotonically while the real thread may be tiny or freshly compacted. With
compression.codex_app_server_auto=hermes that estimate alone tripped the
threshold and fired thread/compact/start on nearly every turn of a long-lived
session (#100381 ).
Mirror the main loop's post-response capture: _record_codex_app_server_usage
now snapshots the reported thread usage into agent._usage_anchor (base prompt
+ completion exactly as the provider counted them, with estimation confined to
messages appended since). A usage-less turn keeps the previous anchor, and the
post-compaction invalidation site is unchanged.
2026-09-06 13:21:17 -07:00
..
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 05:42:22 -07:00
2026-09-06 20:50:02 +05:30
2026-09-02 13:29:48 -07:00
2026-09-03 13:16:47 -07:00
2026-09-02 18:56:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-06 12:02:58 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 02:12:35 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:16:47 -07:00
2026-09-06 05:37:03 -07:00
2026-09-06 05:37:03 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 20:10:26 -07:00
2026-09-02 21:38:20 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 00:41:09 +05:30
2026-09-03 13:29:35 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 08:15:22 -07:00
2026-09-02 18:18:18 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-02 18:49:57 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-05 10:54:19 +05:30
2026-09-07 00:41:09 +05:30
2026-09-05 06:09:24 -07:00
2026-09-02 18:47:54 -07:00
2026-09-06 09:09:00 -07:00
2026-09-06 13:21:17 -07:00
2026-09-06 22:45:31 +05:30
2026-09-02 18:18:18 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:49:57 -07:00
2026-09-06 09:09:00 -07:00
2026-09-03 09:44:26 -07:00
2026-09-05 16:44:23 +05:30
2026-09-06 13:21:17 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:57:14 -07:00
2026-09-05 17:43:45 +05:30
2026-09-03 22:00:01 -07:00
2026-09-03 13:48:49 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 08:15:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:58:42 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 04:31:46 -07:00
2026-09-06 05:48:39 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 13:29:48 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 18:22:13 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:23:20 -07:00
2026-09-02 19:32:53 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:58:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:53:53 -07:00
2026-09-05 13:51:06 -07:00
2026-09-03 13:28:22 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:58:42 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 20:02:44 -07:00
2026-09-03 22:00:01 -07:00
2026-09-02 19:22:42 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:22:13 -07:00
2026-09-02 18:29:05 -07:00
2026-09-02 22:21:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:50:13 -07:00
2026-09-02 18:28:38 -07:00
2026-09-02 18:28:38 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:10:21 -07:00
2026-09-04 15:58:59 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:33:06 -07:00
2026-09-06 09:09:00 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 09:11:04 -07:00
2026-09-02 22:21:06 -07:00
2026-09-02 19:05:15 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 02:44:24 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 15:07:39 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 18:22:01 -07:00
2026-09-03 13:28:22 -07:00
2026-09-06 13:08:31 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:33:06 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 18:44:36 -07:00
2026-09-02 19:10:21 -07:00
2026-09-02 19:22:52 -07:00
2026-09-02 19:18:18 -07:00
2026-09-02 18:51:24 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 13:48:49 -07:00
2026-09-02 19:18:18 -07:00
2026-09-02 18:31:56 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:16:38 -07:00
2026-09-02 19:19:44 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:18:18 -07:00
2026-09-03 04:56:59 +05:30
2026-09-03 09:44:26 -07:00
2026-09-06 05:35:12 -07:00
2026-09-03 13:46:50 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:19:44 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:51:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 12:29:52 -07:00
2026-09-03 13:29:35 -07:00
2026-09-02 19:42:28 -07:00
2026-09-03 03:31:03 -07:00
2026-09-04 02:03:08 -07:00
2026-09-02 19:36:47 -07:00
2026-09-06 22:45:31 +05:30
2026-09-03 13:24:04 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 19:45:03 -07:00
2026-09-02 19:19:44 -07:00
2026-09-02 19:42:28 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 13:29:35 -07:00
2026-09-05 00:10:26 -07:00
2026-09-03 10:40:25 -07:00
2026-09-06 22:56:51 +05:30
2026-09-02 22:23:45 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 18:51:40 -07:00
2026-09-02 19:39:27 -07:00
2026-09-03 09:44:26 -07:00
2026-09-06 09:09:00 -07:00
2026-09-06 09:09:00 -07:00
2026-09-03 13:12:23 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 13:29:35 -07:00
2026-09-03 13:29:35 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:48:14 -07:00
2026-09-06 12:02:58 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:12:23 -07:00
2026-09-02 18:53:04 -07:00
2026-09-06 09:09:00 -07:00
2026-09-06 21:37:47 +05:30
2026-09-03 13:12:23 -07:00
2026-09-03 13:12:23 -07:00
2026-09-02 18:40:01 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:30:27 -07:00
2026-09-02 19:26:50 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 18:45:32 -07:00
2026-09-03 09:44:26 -07:00
2026-09-06 12:02:43 -07:00
2026-09-06 05:42:22 -07:00
2026-09-03 13:46:50 -07:00
2026-09-02 19:19:54 -07:00
2026-09-02 18:29:10 -07:00
2026-09-02 19:07:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 07:17:00 -07:00