Claude Code token usage - Edit tool

Author: mephi42Created Mar 24, 2026Updated Jun 21, 2026

I noticed high token usage in my Claude Code sessions and decided to read Coding Agent logs to better understand where this is coming from. As expected, 99.9% of it are cache_read_input_tokens. The interesting part is that after

{
  "type":"assistant",
  "message":{
    "model":"claude-opus-4-6",
    "id":"<snip>",
    "type":"message",
    "role":"assistant",
    "content":[{
      "type":"tool_use",
      "id":"<snip>",
      "name":"Edit",
      <snip>

I get

{
  "type":"user",
  "message":{
    "role":"user",
    "content":[{
      "tool_use_id":"<snip>",
      "type":"tool_result",
      "content":"The file <snip> has been updated successfully."
    }]
  },
  "parent_tool_use_id":null,
  "session_id":"<snip>",
  "uuid":"<snip>",
  "tool_use_result":{
    "filePath":"<snip>",
    "oldString":"<snip>",
    "newString":"<snip>",
    "originalFile":"<snip>",
    <snip>

originalFile contains all 5K lines of the file in question. I wonder if this is sent to the LLM and whether this is necessary?