Import chat history with the sky CLI

Updated October 22, 2026

Move a local Claude Code or Codex session to your AgentSky workspace from the command line.

sky import reads a local agent session and uploads it as a chat in your workspace. The imported chat is free — it does not cost compute. You can continue it in the cloud after import.

How to import:

  1. In your terminal, run:

    sky import --current
    

    This imports the session the agent is running in, or the most recent Claude Code or Codex session in the current folder.

  2. Review what will be sent and confirm (-y skips the question).

  3. The session appears in your workspace as an imported chat.

What gets imported by default:

  • The full conversation
  • Skills and tool-server (MCP) setup
  • Repository state
  • The whole working folder, so the cloud agent starts with the same files

Options:

sky import --all                # import every session found, up to --limit
sky import --session <id>       # import one specific session
sky import --no-environment     # keep the folder on this computer; send only the files the chat touched
sky import --no-files           # send the conversation only
sky import --json               # print one JSON result per import

Where: terminal (any OS)

Good to know: the working folder is uploaded as it is on disk, so check it holds nothing you would not share with the workspace, or use --no-environment. The web equivalent is Settings › Advanced › Import. Related: Import chats and setup from a local agent, Use the sky CLI, Use the trace library.

View as Markdown