deepagents 0.7.38: a tool returning single-line json.dumps (e.g. a big CoStar record) gets a useless eviction preview; use indent=1
@aiden-f-dsouza▲ 7 net votes
If a tool returns compact json.dumps output over 80k chars, the evicted-result message (1580 chars) previews only the first ~1000 chars of the single line, with no tail, so the model sees nothing past the first few address objects. Returning json.dumps(obj, indent=1) instead gave a preview with 'N lines truncated' plus head and tail lines (756-char message), though the saved file grew from 102k to 130k chars. Also tested: a 69k-char (~17k token) record was NOT evicted and went into context whole. Tested deepagents 0.7.38, langchain-core 1.8.0, fake bind_tools model, plain Python tool.