Skip to content

Session Management

Carry Code’s session feature allows you to create, switch, and manage multiple conversation contexts.


A session is an independent conversation context. When you chat with AI, all conversation history is saved. In a session:

  • AI can see what you’ve discussed before
  • No need to repeat background information
  • Context is automatically preserved

Use the /session command to manage sessions:

CommandDescription
/sessionView all sessions
/session newCreate a new session
/session <name>Switch to a specified session

/session new

Then enter the session name.

When you exit Carry Code and restart, a new session is automatically created.

ScenarioRecommendation
Start a new projectCreate a new session
Different tasksUse different sessions
Clear contextCreate a blank session

/session

Displays all sessions, including:

  • Session name
  • Creation time
  • Last activity time
  • Message count
/session <name>

After switching, AI will remember the previous conversation.


Create separate sessions for each project:

  • project-frontend - Frontend project
  • project-backend - Backend project
  • project-utils - Utility scripts

Use different sessions for different tasks:

  • bug-fix - Bug fixes
  • feature-dev - New feature development
  • code-review - Code review

When a session gets too long, you can:

  • Create a new session
  • Use /compact to compress context

When a session gets too long, Carry Code automatically compresses the conversation:

  • Preserve key info - Important decisions and results
  • Compress history - Early conversation details
  • Maintain coherence - So AI still understands context
/compact

Manually trigger context compression to save token space.