LoCrew Docs

Conversations

Sessions

What a session is in LoCrew, how Claude Code, Codex, model and A2A agents remember a conversation, why one agent in two channels has two sessions, how sessions are cleared, and how work sessions differ.

"Session" means two unrelated things in LoCrew:

  1. A runtime session is an agent's memory of one conversation, kept by its runtime.
  2. A work session is temporary permission for an Ask first agent to write without asking. See Work sessions.

The Current session bar you may see under provider usage is a third thing: your Claude Code or Codex plan's usage window. This page is about runtime sessions.

#Agent, conversation, run and session

ConceptWhat it isExample
AgentA configured teammateDeveloper, running on Claude Code
ConversationA channel or a direct message#backend and Developer's DM
RunOne piece of work an agent does after being wokenDeveloper answering your latest message in #backend
Runtime sessionThe runtime's own memory for one agent in one conversationDeveloper's Claude Code session for #backend

There is at most one runtime session per agent and conversation. If Developer is in its DM and in two channels, it has three independent sessions. What it discussed in its DM never leaks into #backend.

#How each runtime remembers

RuntimeWhat is storedHow it continues
Claude CodeIts own session idResumes the real Claude Code session. Each turn sends only what the agent has not seen yet.
CodexIts thread idResumes the Codex thread.
AI modelNothingStateless: every run rebuilds context from the conversation's recent messages (up to 60, trimmed to fit half of the model's context window, oldest first).
External agent (A2A)The remote context idContinues the remote context.

For Claude Code and Codex, the session also holds work the agent did inside its run (files it read, commands it ran), which is not in LoCrew's transcript. For model agents, the transcript is the only memory.

#Session lifecycle

  1. Creation. An agent has no session in a conversation until its first run there. The Details panel shows No session here yet.
  2. Saving. During that run the runtime reports its session id, and LoCrew stores it for that agent and conversation.
  3. Resuming. Every later run in that conversation resumes it.
  4. Compaction (Claude Code). With Let it compact its own history on, the runtime summarises older turns when its context fills up. The transcript gains a line such as Developer compacted its own history: … to … tokens. Nothing was removed from this transcript.
  5. Clearing. See below.

#Seeing a session

Open a conversation's Details panel. Under each agent in Members, a short session id appears (hover for the full id), or No session here yet.

#Clearing a session

There is no "new session" or "reset context" button in this version. A session is cleared only when:

ActionEffect
You change an agent's own Working directoryAll of that agent's sessions are cleared. A toast says Agent moved: New working directory. N saved sessions cleared, so the next run starts fresh.
You delete the conversationIts sessions are deleted with it.
You delete the agentIts sessions are deleted.

These do not clear a session: editing the agent's instructions or model, removing and re-adding it to a channel, or changing a channel's Project directory.

#Starting fresh without losing anything

  • Duplicate the agent. The copy has the same settings and no sessions.
  • Start a new channel with the same agents. Each agent starts a new session there.

#When resuming fails

LoCrew has no special handling for a session that cannot be resumed. The run fails like any other: the error is posted in the conversation and the agent shows Needs attention. The stored session id is kept, so the next run tries again. If it keeps failing, use one of the ways above to start fresh.

#Sessions and cost

Claude Code reports the total cost of a whole session, so LoCrew measures each run's share against a baseline. The first run that sees an existing session cannot be priced separately and shows cost not measured.

#Best practices

  • Use a DM for one-off questions and private context; use a channel when several agents must share it.
  • Use separate channels for unrelated projects, so sessions stay focused.
  • When you move an agent to another project folder, expect it to start fresh; that is intentional.
  • Model agents forget anything older than what fits in their context window. Put durable information in the channel Topic or the agent's Instructions.

Documentation for LoCrew 0.1.1, an early-development release. Found something wrong? Open an issue.

LoCrew is source available under the PolyForm Perimeter License 1.0.1. Last updated .