[Bug] Background agent continues running after CLI exit, /resume fails with attachment error
Bug Description
My entire session is in a background agent called 'bg'. i exited the cli and came back. i tried to /resume my context window, but received a message saying this was a background agent and i needed to attach to it. I HAD EXITED THE PROGRAM! WHY WAS THERE A BACKGROUND AGENT RUNNING WITHOUT THE CLI RUNNING?
I used plan mode, then was forced to use auto mode, even tough I used bypassPermissions mode when starting the cli. Then, I couldn't switch back to bypass permissions mode from auto mode.
I exited the program and came back and used /resume but my session was not the first one on the list. it was the third. It said it was an hour old, even though i had just interacted with it a few minutes before.
Environment Info
- Platform: linux
- Terminal: xterm-256color
- Version: 2.1.144
- Feedback ID: 0b65fbc3-6f85-49ab-8331-557429c25937
Errors
[{"error":"Error: EISDIR: illegal operation on a directory, read '/home/samuel/PhpstormProjects/nexus/resources/views/components'\n at GMH (/$bunfs/root/src/entrypoints/cli.js:1659:144)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T06:41:51.122Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/samuel/PhpstormProjects/nexus.\n at call (/$bunfs/root/src/entrypoints/cli.js:4277:11536)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T07:07:48.286Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/home/samuel/PhpstormProjects/nexus/database/seeders'\n at GMH (/$bunfs/root/src/entrypoints/cli.js:1659:144)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T07:08:01.412Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/samuel/PhpstormProjects/nexus.\n at call (/$bunfs/root/src/entrypoints/cli.js:4277:11536)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T07:09:06.607Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/home/samuel/PhpstormProjects/nexus/resources/views/livewire/accounting'\n at GMH (/$bunfs/root/src/entrypoints/cli.js:1659:144)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T07:10:22.023Z"},{"error":"Error: File does not exist. Note: your current working directory is /home/samuel/PhpstormProjects/nexus.\n at call (/$bunfs/root/src/entrypoints/cli.js:4277:11536)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-19T07:57:17.872Z"}]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗