kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Document dev container persistence requirements for Kilo threads

Open Juice10 opened this issue 1 year ago • 4 comments

Description

Description

Dev container users lose access to existing Kilo threads after rebuilding containers. Clicking old threads removes them from the list instead of restoring conversation history.

Current Documentation Issue

No guidance exists for preserving Kilo Code state across dev container rebuilds.

User Feedback

User report: https://app.frontapp.com/open/msg_2q55w6ce?key=eIhNnLodwNzZj_DNU7BZgIw7t8TDO5PE

Proposed Documentation Update

Create dev container setup guide covering:

  • Required files/directories to persist in .devcontainer configuration
  • Volume mount recommendations for Kilo thread storage
  • Troubleshooting steps for thread recovery

User Impact

Benefits all developers using Kilo Code in containerized development environments.

Juice10 avatar Jun 11 '25 15:06 Juice10

/home/vscode/.vscode-server/data/User/globalStorage/kilocode.kilo-code/tasks is ephemeral storage and doesn't last container rebuilds. My chats history have just got smoked…

iRonin avatar Jul 23 '25 15:07 iRonin

Settings are not preserved either…

iRonin avatar Jul 23 '25 15:07 iRonin

and agent modes is lost...

ThePlenkov avatar Sep 23 '25 15:09 ThePlenkov

@Juice10 @iRonin @ThePlenkov Hope this helps before a PR is available. I’ve been hitting the same issue (storage resetting after every Devcontainer rebuild), so here’s the workaround that’s been working reliably for me.

I map Kilo-code’s storage to a persistent directory on the macOS host.

1. Create a persistent storage folder on macOS

mkdir -p ~/.kilocode

2. Bind-mount it into the Devcontainer

Add this to devcontainer.json:

"mounts": [
  "source=${localEnv:HOME}/.kilocode,target=/home/node/.kilocode,type=bind"
]

3. Expose the same absolute path inside the container

(So host VS Code and container VS Code resolve the same storage path)

In postStartCommand:

sudo mkdir -p /Users && sudo ln -sfn /home/node /Users/<username>

This creates a stable mapping:

/Users/<username>/.kilocode → /home/node/.kilocode → macOS ~/.kilocode

4. Point Kilo-code to this path

(On the host; VS Code syncs this automatically into the container)

Kilo-code: Custom Storage Path = /Users/<username>/.kilocode

This setup keeps Kilo-code sessions persistent across Devcontainer rebuilds and allows both host and container to share the same storage.

neow021 avatar Nov 26 '25 04:11 neow021