[Feature Request] Auto-restore Claude Code sessions after machine restart
Resolved 💬 3 comments Opened Apr 17, 2026 by vishalv-rafay Closed Apr 21, 2026
Bug Description
Typically devs run the claude terminal sessions overnight. If for somereason , the machine(laptop) restarts , terminal is ended and post restart the claude sessions are not auto started. This ends up I losing the whole context and I have restart everything. This is extremely frustrating. can you please look at fixing this
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.112
- Feedback ID: 4b5feeee-9d55-46ee-bf01-5f2fee2e8a5d
Errors
[{"error":"AxiosError: Request failed with status code 401\n at XU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12736)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:117:2467)\n at async sc1 (/$bunfs/root/src/entrypoints/cli.js:3084:14667)\n at async Ee9 (/$bunfs/root/src/entrypoints/cli.js:3084:15206)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T19:16:25.409Z"},{"error":"MaxFileReadTokenExceededError: File content (38107 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Xf7 (/$bunfs/root/src/entrypoints/cli.js:4718:12550)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T19:16:40.499Z"},{"error":"Error: ensureToolResultPairing: repaired missing tool_result blocks (125 -> 125 messages). Message structure: [0] user; [1] assistant(id=msg_01QK7gb4aaEf1HJEZnrM7S3V, tool_uses=[toolu_01UTPCjsJUuwEpBPWgmsVxZi]); [2] user(tool_results=[toolu_01UTPCjsJUuwEpBPWgmsVxZi]); [3] assistant(id=msg_01UqLjPgwDauZDRfkhfw7gep, tool_uses=[toolu_01PtRzX7x6u8Pjfni9rxoni2]); [4] user(tool_results=[toolu_01PtRzX7x6u8Pjfni9rxoni2]); [5] assistant(id=msg_01162hZWcJBfPznP8Mi11fgR, tool_uses=[toolu_01S5B8jdGFUoGrLxtxXfTFcz]); [6] user(tool_results=[toolu_01S5B8jdGFUoGrLxtxXfTFcz]); [7] assistant(id=msg_01JAAVUFS1whaRScNMFyFrmb, tool_uses=[toolu_01HiKWrk8Ng24aZNr7WrBL9t]); [8] user(tool_results=[toolu_01HiKWrk8Ng24aZNr7WrBL9t]); [9] assistant(id=msg_01CfsW7C1fpyjzSdQ8gRQREk, tool_uses=[toolu_016cJxLeASHpWW4w8YsZ8r5s]); [10] user(tool_results=[toolu_016cJxLeASHpWW4w8YsZ8r5s]); [11] assistant(id=msg_01RnJ6iyc2Bw2qdUKFtPdyjr, tool_uses=[toolu_01RA1EFhyVD43ERFqcc1AMg1]); [12] user(tool_results=[toolu_01RA1EFhyVD43ERFqcc1AMg1]); [13] assistant(id=msg_01GBpJRY9hpRyvekKuHhbVWr, tool_uses=[toolu_0148rQeLCA1bm4Hr1VWpgyTr]); [14] user(tool_results=[toolu_0148rQeLCA1bm4Hr1VWpgyTr]); [15] assistant(id=msg_01DXceeoX4cdqKSnpJHvPKbN, tool_uses=[toolu_01QKscSVjFpGR1T8caKCZgN9]); [16] user(tool_results=[toolu_01QKscSVjFpGR1T8caKCZgN9]); [17] assistant(id=msg_01ToontQ5osftdPAYU7NRMug, tool_uses=[toolu_01FJgftEeiP21RgNnVh5ciyk]); [18] user(tool_results=[toolu_01FJgftEeiP21RgNnVh5ciyk]); [19] assistant(id=msg_01CHLXsvNLNN7sAK4RXcLCKb, tool_uses=[toolu_01GL2pgAmXhNdJuoSt9E2Vsc]); [20] user(tool_results=[toolu_01GL2pgAmXhNdJuoSt9E2Vsc]); [21] assistant(id=msg_01Kj9X7i4pN5z63SyBhGiQyN, tool_uses=[toolu_01AtzFSp5rSDXKDv3ppMhGXA]); [22] user(tool_results=[toolu_01AtzFSp5rSDXKDv3ppMhGXA]); [23] assistant(id=msg_01VRqtgBDTFmk2d8Qmq8fSqv, tool_uses=[toolu_01Cwod3b5yGp4YMsvr3FGcjW]); [24] user(tool_results=[toolu_01Cwod3b5yGp4YMsvr3FGcjW]); [25] assistant(id=msg_01PXPKwkJmLqmNstoZTa1zuX, tool_uses=[toolu_015PdBRT51A7M5HABWcUsZqu]); [26] user(tool_results=[toolu_015PdBRT51A7M5HABWcUsZqu]); [27] assistant(id=msg_018YCww7CePGH3oCkRerEkes, tool_uses=[]); [28] user; [29] assistant(id=msg_01YXMjGmSS3JuXtM3u3G8VqU, tool_uses=[toolu_01RuzuqpCac6tDVgPFZsFTvc]); [30] user(tool_results=[toolu_01RuzuqpCac6tDVgPFZsFTvc]); [31] assistant(id=msg_01QYDdBN4fGbrYdMnQqVEmsh, tool_uses=[toolu_017SPoPmFQNRNMWMsY25VP3j]); [32] user(tool_results=[toolu_017SPoPmFQNRNMWMsY25VP3j]); [33] assistant(id=msg_01Rm36FFfHDqNJeCKJj5t3XV, tool_uses=[]); [34] user; [35] assistant(id=msg_013kV7jkAn3WwKM3honCwcTT, tool_uses=[toolu_01PPC1efSaGEfP4KUxyvbXhm]); [36] user(tool_results=[toolu_01PPC1efSaGEfP4KUxyvbXhm]); [37] assistant(id=msg_01TRTz6sNAagnnZsF2oQ1VS1, tool_uses=[]); [38] user; [39] assistant(id=msg_01YEcAnyt267vPQpxAiscct8, tool_uses=[]); [40] user; [41] assistant(id=msg_01NbMYgMMYNtK2gTCUUNr6kp, tool_uses=[]); [42] user; [43] assistant(id=msg_01MtkXPKMcja2QvBoGj9YSqb, tool_uses=[toolu_01RwEwo6VsgDtgH3DAuc9RXF]); [44] user(tool_results=[toolu_01RwEwo6VsgDtgH3DAuc9RXF]); [45] assistant(id=msg_011cKFo1c4edpVQdXfN74HmF, tool_uses=[]); [46] user; [47] assistant(id=msg_01JSXMAHZPgGhfvayEY1hpYo, tool_uses=[toolu_01AwWLMGbUcWuW1yfTqhGKjT]); [48] user(tool_results=[toolu_01AwWLMGbUcWuW1yfTqhGKjT]); [49] assistant(id=msg_01YVe6pmD3DNHveD6RPRx6TC, tool_uses=[]); [50] user; [51] assistant(id=msg_01CuHRpi7iZVxZsYNJ74TQWW, tool_uses=[toolu_01FvGdseHsL2si6LNuj9vZej]); [52] user(tool_results=[toolu_01FvGdseHsL2si6LNuj9vZej]); [53] assistant(id=msg_01UaaTosSHLKtwZej7Lc2jqd, tool_uses=[toolu_01SkNhgJ2PM1gSdyNf9mifpj]); [54] user(tool_results=[toolu_01SkNhgJ2PM1gSdyNf9mifpj]); [55] assistant(id=msg_01T7SwGPj4D5RbLtfW9Wdn8Q, tool_uses=[toolu_01SM5Rt1fHvnbTEKuNuK9g2p]); [56] user(tool_results=[to…
Note: Content was truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗