[Bug] Excessive token consumption during code operations
Resolved 💬 3 comments Opened Apr 19, 2026 by younessbout Closed Apr 23, 2026
Bug Description
token consumption is crazy like hell
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.114
- Feedback ID: 530024a6-a0e3-4b87-a2f0-c08d8832058b
Errors
[{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (250 -> 250 messages). Message structure: [0] user; [1] assistant(id=msg_01UE8wTT489Wa54KqbQVSWMW, tool_uses=[toolu_01Jyu6TzdQz6AvsQXQXbkGBm]); [2] user(tool_results=[toolu_01Jyu6TzdQz6AvsQXQXbkGBm]); [3] assistant(id=msg_017huNEa3BqKET8iLghUp2Gx, tool_uses=[toolu_01Tj46duaZFTCf9E9seq35tK]); [4] user(tool_results=[toolu_01Tj46duaZFTCf9E9seq35tK]); [5] assistant(id=msg_019dyHk5gRH9W6E8xyaXo2Hi, tool_uses=[toolu_0175vSGzQu2wHafisSEWHNBK]); [6] user(tool_results=[toolu_0175vSGzQu2wHafisSEWHNBK]); [7] assistant(id=msg_01WkCA21AvecnWhQWWvZxRYR, tool_uses=[toolu_01UXXWnt7HxDS4nAuzNpY514]); [8] user(tool_results=[toolu_01UXXWnt7HxDS4nAuzNpY514]); [9] assistant(id=msg_016vAiUTg7RMN4qkFLHLXPP7, tool_uses=[]); [10] user; [11] assistant(id=msg_01CkLCHNoGLRm2DnjyAQ9N8Q, tool_uses=[toolu_015Te6Qv4ge7bPVVam8ujLGM]); [12] user(tool_results=[toolu_015Te6Qv4ge7bPVVam8ujLGM]); [13] assistant(id=msg_01RnANF2axuF5jjJnh1d3LdD, tool_uses=[toolu_01GpoYyg1hAqsGJtj2tiM2sL,toolu_01BYev2WpAmB7Yg2QMu7cu1e]); [14] user(tool_results=[toolu_01GpoYyg1hAqsGJtj2tiM2sL,toolu_01BYev2WpAmB7Yg2QMu7cu1e]); [15] assistant(id=msg_01XyVUCJDtiEvWpbLs4VDZrC, tool_uses=[toolu_011oSvuzDiBNxt7u7wwg7rLv,toolu_018ycotPLEKjN3K8qff2FY8x]); [16] user(tool_results=[toolu_011oSvuzDiBNxt7u7wwg7rLv,toolu_018ycotPLEKjN3K8qff2FY8x]); [17] assistant(id=msg_018UV9FRKhhp9C5EjNvE4Zyj, tool_uses=[toolu_014bbDDRs9mcatVXBS4tpeet]); [18] user(tool_results=[toolu_014bbDDRs9mcatVXBS4tpeet]); [19] assistant(id=msg_01CaN7vakFTik2HxVTrU7JyK, tool_uses=[toolu_01FFSZyoyn3Gc4mwE4gtbX1F,toolu_01CAgRyWkAoBJJHhrbnsMAq2,toolu_01XuafcxYGxFUt87xZoDE4Bj]); [20] user(tool_results=[toolu_01FFSZyoyn3Gc4mwE4gtbX1F,toolu_01CAgRyWkAoBJJHhrbnsMAq2,toolu_01XuafcxYGxFUt87xZoDE4Bj]); [21] assistant(id=msg_01AvSvhrj7iTwtzeqLvEV6cv, tool_uses=[toolu_013VomJYKDdHx9GfmrBKeSrN,toolu_01JZue2W4kQSr6qBypr8nC8e,toolu_0179ufupEjmRCLN7Xjs4C2Zg]); [22] user(tool_results=[toolu_013VomJYKDdHx9GfmrBKeSrN,toolu_01JZue2W4kQSr6qBypr8nC8e,toolu_0179ufupEjmRCLN7Xjs4C2Zg]); [23] assistant(id=msg_01SsaMY4epmaNxdmByTP4WY9, tool_uses=[toolu_01UBRCRvXef4UBidBMXuiE6r,toolu_01LW8ANgPQo3XpfeJHTdBcJ8,toolu_0169XuexJpNpEmRtjXWA4r7t]); [24] user(tool_results=[toolu_01UBRCRvXef4UBidBMXuiE6r,toolu_01LW8ANgPQo3XpfeJHTdBcJ8,toolu_0169XuexJpNpEmRtjXWA4r7t]); [25] assistant(id=msg_015gKBScKKKCEyFDvY5pmrZh, tool_uses=[toolu_017D5X5S6RZFV9BAii5s1x13,toolu_01Txkdv1M5MWMEccBtLUFZYz]); [26] user(tool_results=[toolu_017D5X5S6RZFV9BAii5s1x13,toolu_01Txkdv1M5MWMEccBtLUFZYz]); [27] assistant(id=msg_01CheixZXuGgq7yg3gndMgzE, tool_uses=[toolu_01YXpgqfydHvxskeyHVuiaJC]); [28] user(tool_results=[toolu_01YXpgqfydHvxskeyHVuiaJC]); [29] assistant(id=msg_01PGBCsN55MfvHDCLCJntYK4, tool_uses=[toolu_01LkbnZMfyfFQgDedsqhXfYD]); [30] user(tool_results=[toolu_01LkbnZMfyfFQgDedsqhXfYD]); [31] assistant(id=msg_01CJ4mSAgsKyvYC5ia7RJKCi, tool_uses=[toolu_017sGNaougtkaoSCeuExFLDJ]); [32] user(tool_results=[toolu_017sGNaougtkaoSCeuExFLDJ]); [33] assistant(id=msg_01G3shoutfmDMbZTshUdVedH, tool_uses=[toolu_01JtwyHbq3LyyBdVxkLEWbXG]); [34] user(tool_results=[toolu_01JtwyHbq3LyyBdVxkLEWbXG]); [35] assistant(id=msg_01JorHpXb3mvBLSxAvzhNPHV, tool_uses=[toolu_011zvHcxJEQULNsDtQNtEpni,toolu_01Gc9EnaDUTy38kFzjMfXLwW]); [36] user(tool_results=[toolu_01Gc9EnaDUTy38kFzjMfXLwW,toolu_011zvHcxJEQULNsDtQNtEpni]); [37] assistant(id=msg_01AXajEg2YF2Ux1YrhXFczxq, tool_uses=[]); [38] user; [39] assistant(id=msg_01NFhB1DVxaUjt38N9VNHTtX, tool_uses=[toolu_01RSbd2bApkrNmebsAuTLqkJ]); [40] user(tool_results=[toolu_01RSbd2bApkrNmebsAuTLqkJ]); [41] assistant(id=msg_01SwJenWxFEA1xFmx31SMdjC, tool_uses=[]); [42] user; [43] assistant(id=msg_01EDWWoqh9A5LQ8tphMDPq9d, tool_uses=[toolu_01BW5Mg6ZCp3Gr4Yy26oda8R,toolu_01RQnuY372LfaBPATmbu4Pyq]); [44] user(tool_results=[toolu_01BW5Mg6ZCp3Gr4Yy26oda8R,toolu_01RQnuY372LfaBPATmbu4Pyq]); [45] assistant(id=msg_01GgAePY6nsms6SpCUcaYtGV, tool_uses=[]); [46] user; [47] assistant(id=msg_01XFDWghRHNG4d7bEtvwPYLc, tool_uses=[toolu_01625K7sKc2uvXW9CQLm183u]); [48] user(tool_results=[toolu_01625K7sKc2uvXW9CQLm183u]); [49] assistant(id=msg_01VoKexZLBKADTsgqQSK6C1Z, tool_uses=[toolu_014R9dYYTB6ZzC8vVgYqosaq]); [50] user(tool_results=[toolu_014R9dYYTB6ZzC8vVgYqosaq]); [51] assistant(id=msg_01B6DJGYrqGUXtzyCUa9GCLT, tool_uses=[toolu_01RL6GMDURm644h5UHrZcZS6]); [52] user(tool_results=[toolu_01RL6GMDURm644h5UHrZcZS6]); [53] assistant(id=msg_01UiYXRM5xXoR3z3VWHoj8RJ, tool_uses=[toolu_019yZNa6i9qtQLNeyPKw9Yq7,toolu_019iruz8u573FzhDX3rHNkBx,toolu_01Pz54wE8Xaa2KoKC5N2Hejx]); [54] user(tool_results=[toolu_019yZNa6i9qtQLNeyPKw9Yq7,toolu_019iruz8u573FzhDX3rHNkBx,toolu_01Pz54wE8Xaa2KoKC5N2Hejx]); [55] assistant(id=msg_01NA7vbrFAf1EAGtGhea1g2X, tool_uses=[toolu_01Lm5w7LGmV1VV2hqj58Wroi]); [56] user(tool_results=[toolu_01Lm5w7LGmV1VV2hqj58Wroi]); [57] assistant(id=msg_01QSLahCPdCxbAk9fZgrX4oh, tool_uses=[]); [58] user; [59] assistant(id=msg_01FUr7a7tM5n8ycELd2DtzQ8, tool_uses=[toolu_01RbXS8Q86QaHETuZ1tW2kNj]); [60] user(tool_results=[toolu_01RbXS8Q86QaHETuZ1tW2kNj]); [61] assistant(id=msg_01ATv9UbjMwdDFUfJBu2pTp6, tool_uses=[toolu_01FC2qG1DK5a4aVrC8oTNx3d,toolu_01PpLaAmDUvX2nsiHqP5kPrR]); [62] user(tool_results=[toolu_01FC2qG1DK5a4aVrC8oTNx3d,toolu_01PpLaAmDUvX2nsiHqP5kPrR]); [63] assistant(id=msg_01GhUxotDUeeaxM61w9maRib, tool_uses=[toolu_01RM1aJJfzrR86ELBoCoPBPg]); [64] user(tool_results…
Note: Content was truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗