> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sessions import

> Move a Claude Code or Codex session to Base Code

Continue a Claude Code or Codex session in [Base Code](https://docs.base44.com/Getting-Started/base-code.md). Base Code lets you work on a GitHub project in the cloud using AI. You might start working on a project locally, in Claude Code or Codex, and want to continue in Base Code. Use this command to import that session, so you can maintain context across different development environments.

You can also import a session from the start screen in Base Code, without running this command.

You can import a session from:

* claude.ai
* Your current session in Claude Code or Codex.
* A session file on your computer

Before you import, make sure you have a [Base Code project](https://docs.base44.com/Getting-Started/base-code.md#setting-up-base-code) and [sign in](https://docs.base44.com/developers/references/cli/commands/login.md) with an account that has edit access to the project.

## Usage

```bash theme={null}
base44 sessions import
```

If you don't pass a session link, `--current`, or `--file`, the command lists the Claude Code and Codex sessions in your current folder which you can choose from.

> [!WARNING]
>
> The command doesn't support non-interactive flags. When using a script, or with `--json` you must pass a session link, `--current`, or `--file`.

The command uploads the session to Base Code:

* The first time you import a session, Base Code creates a branch for it, or continues on the session's own branch if you pushed it to GitHub.
* If you import the same session again, the command adds only the new messages to that branch.

> [!NOTE]
>
> You can import the same session again as long as the AI in Base Code has finished its work on the branch and the earlier messages haven't changed. To learn more about import errors, see [Common errors](#common-errors).

The command prints how many messages it imported and a link to the branch in Base Code.

## Arguments

| Argument | Description | Required |
| - | - | - |
| `[session-link]` | Link to a claude.ai session, such as `https://claude.ai/code/session_<id>`. Pass only one of the link, `--current`, or `--file`. | No |

## Flags

| Flag | Description |
| - | - |
| `--current` | Import the session this command runs from. |
| `--file <path>` | Import the session file specified in the path. |
| `--skip-push-check` | Import even though your local changes aren't on GitHub. Base Code pulls from what's on GitHub, so those changes won't be included. |
| `--token <key>` | One-time import key from Base Code. Provided when you import from the Base Code start screen. The key expires after 10 minutes and is scoped to the project you're importing into. |

## Common errors

You may encounter the following errors:

| Error | What to do |
| - | - |
| The session exceeds the 50 MB limit. | Import a smaller session. |
| Your project has local commits that aren't on GitHub. | Push the commits to GitHub, or pass `--skip-push-check` to import without them. |
| The project isn't connected to its GitHub repository. | Connect the project to its repository in Base Code, then run the command again. |
| The AI in Base Code is still working on the branch. | Wait for the AI to finish, then run the command again. |
| The session has changed since you first imported it, so Base Code can't add its newer messages to the branch. | In Base Code, open **Import session** and select **Import into a new branch**. |

## See also

* [`link`](https://docs.base44.com/developers/references/cli/commands/link): Link a local project to a Base44 project
* [`login`](https://docs.base44.com/developers/references/cli/commands/login): Sign in to Base44


## Related topics

- [CLI Commands Overview](https://docs.base44.com/pt-BR/developers/references/cli/commands/introduction.md)
- [login](https://docs.base44.com/pt-BR/developers/references/cli/commands/login.md)
- [link](https://docs.base44.com/pt-BR/developers/references/cli/commands/link.md)
- [createPlatformClient](https://docs.base44.com/pt-BR/developers/references/platform-sdk/docs/functions/createPlatformClient.md)
- [Importar do Figma para a Base44](https://docs.base44.com/pt-BR/Getting-Started/import-from-figma-guidelines.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.