summaryrefslogtreecommitdiff
path: root/BUGS.md
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-12-03 16:43:51 -0700
committert <t@tjp.lol>2026-12-04 13:53:47 -0700
commit8c167c49f18c76f1f867778341ac821591d9d990 (patch)
treec86df0cf3af948fcff8979ec7c543b8e137cbfdc /BUGS.md
parentf1f1c5bc66ea1d6019f84050aa21e4476330a719 (diff)
Carry oversized history reseeds in the system prompt append
agy keeps only the first ~191 KB of a user message, so a large cold reseed dropped the newest history and the current request. When transcript plus request exceed 160 KB, move the older part of the transcript into the new session's system prompt append, framed as a verbatim record, and keep the newest part with the request in one user message. Refuse a single request too large to fit. Record the probes in docs/findings.md and the separate ~9.9 KB MCP tool result cap in BUGS.md.
Diffstat (limited to 'BUGS.md')
-rw-r--r--BUGS.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/BUGS.md b/BUGS.md
new file mode 100644
index 0000000..b984026
--- /dev/null
+++ b/BUGS.md
@@ -0,0 +1,26 @@
+# Known bugs
+
+## agy cuts MCP tool results to ~9.9 KB before the model sees them
+
+**Status:** open, not investigated further. Found 2026-12-03 while probing history reseed; `agy --version` reported 1.5.23 that day.
+
+**Effect:** any Panto tool result (`std.read`, `std.shell`, ...) larger than about 10 KB reaches Gemini with its middle removed. agy keeps roughly the first and last halves of 9,860–9,862 bytes, inserts `<truncated N of M bytes from the middle of the output>`, and prefixes:
+
+> The tool's output was truncated due to being too long. You can find the full output in a file at file:///…/antigravity-cli/brain/<session>/.system_generated/steps/<n>/output.txt.
+
+The model can't read that file: agy's native tools are disabled, and reading it through a Panto tool hits the same cap.
+
+Panto's own transcript keeps the full result, so the TUI shows output the model never received, and a cold reseed hands the model more than the warm session ever saw.
+
+**Evidence:**
+- Live probe (Hydrogen, stdio MCP server with `antigravity/alwaysLoad`): a 10,386-byte text result was stored and sent to the model as 9,862 bytes with 606 cut from the middle. Confirmed in the model request (`gen_metadata.data`), not only in the stored step.
+- Existing conversations in `~/.local/share/panto-antigravity/google/antigravity-cli/conversations/*.db`: 135 tool results carry the same marker, every one kept at exactly 9,860 or 9,862 bytes, from originals of 10,279 up to 816,745 bytes. For these the marker was matched in stored steps only; the model request was not inspected.
+- MCP `resources/read` of a 20 KB resource is worse: nothing is inlined, the whole body goes to a `resource_0.txt` spill file.
+
+**Not yet checked:**
+- Whether the cap is per tool result or per content block. If per block, the relay could split a large text result into several blocks.
+- Whether a setting, agent-definition field or tool `_meta` hint raises it.
+- Whether image or other non-text blocks are exempt. One real `std__read` step is 65 KB and carries no marker.
+- Whether the cap is bytes or tokens.
+
+**Reproduce:** serve one MCP tool that returns more than 10 KB of text, have the model call it, then search the conversation DB's `steps.step_payload` for `truncated`. Probe scripts were at `/tmp/agy-probe/mcp_big.py` and `probe3.py` (temporary; not in this repo).