Reference

Agent sessions

A session is a saved conversation with one agent. It contains messages, turns, and recorded action activity.

A turn is one request to the agent and the work it does in response. One session can contain many turns. Reusing a session lets a later turn use the earlier conversation as context.

Mobius keeps conversations separate with three pieces of information:

PartMeaning
AgentThe agent that receives the turn
ScopeWhere the conversation belongs, such as the app or a messaging channel
History keyThe identifier for one conversation inside that scope, such as a Slack thread or ticket ID

If there is an active session for that combination, Mobius can reuse it. If there is not, Mobius creates one. Sessions do not move between organizations or agents.

How different work chooses a session

WorkHow the conversation is identified
New chat in the appMobius creates a new history key after you send the first message
Existing app chatContinue chat opens the same session ID
Messaging integrationThe integration uses the provider's conversation identifier, such as a Slack thread
Routine occurrenceThe routine adds its turn to the session it was created in
API invocationYour software supplies the session ID, or omits it for a new one

A routine never opens a session of its own. Every occurrence lands in the conversation where the routine was proposed, so a routine's history and the questions you asked about it share one transcript.

Verify the boundary in the app

Use an agent that already exists. If you do not have an agent, follow Create your first agent.

  1. Open Build > Agents and select the agent.
  2. Open Sessions.
  3. Click New chat session. This opens an empty chat but does not create the session record yet.
  4. Send The code name for this test is Cedar.
  5. After the reply finishes, return to Sessions. Open the most recent row's action menu and choose Copy session ID. Keep this first ID for the final comparison, then choose Continue chat.
  6. Send What is the code name for this test? The new reply and both of your messages remain in the same transcript.
  7. Return to Sessions. The row shows the message count, total recorded token usage, and last-message time.
  8. Click New chat session again and send What is the code name for this test?
  9. Return to Sessions. Copy the newest row's session ID and confirm that it differs from the first ID. Open Session details and confirm that this transcript contains only the message sent after the second New chat session and its reply. It must not contain the earlier Cedar statement.

The second chat has a different session ID and a new transcript. That visible ID and transcript, rather than the wording of the agent's answer, prove that the conversations are separate. Agent memory can supply facts across sessions, so do not use the answer alone as proof of session reuse.

To inspect a row, open its action menu and choose Session details. The page shows the session ID, where the conversation came from, the saved transcript, turn statuses, and action activity. Use Continue chat on direct app or messaging conversations that Mobius allows you to continue.

If a control is missing or disabled, confirm that you are in the correct organization, and ask an administrator whether your role can manage sessions.

Choose a history key from software

When your software invokes an agent through the API, it decides which conversation the turn joins by supplying a session ID or leaving it out.

ChoiceBehavior
Supply an existing session IDThe turn continues that conversation
Omit the session IDMobius opens a new session for this turn

Reuse a session when you can name the subject that should connect the turns, such as one ticket or one pull request. Start a new one when each request should be an independent judgment. Keep your own mapping from that subject to the session ID so the same subject reaches the same conversation twice.

History and memory are different. History selects messages from one conversation. Agent memory can add selected facts to turns in separate sessions.

Saved transcript versus model context

The session detail page is the saved record. The text sent to the model for a new turn is built from that record and the agent's current configuration.

That model context can include:

  • current agent instructions;
  • configured agent memory;
  • messages and recorded action activity from the selected session;
  • a summary in place of older messages after compaction; and
  • shortened action results when a full result is too large.

For this reason, the saved transcript is not a byte-for-byte display of the next model request. The token totals in the Sessions list are cumulative usage recorded for the session, not the size of the context for the next turn.

Session or turn?

The session is the conversation; the turn is one exchange inside it.

RecordUse it to answer
SessionWhat has this agent been asked over time, and what does it now have as context?
TurnWhat happened on one request: which tools were called, what came back, and why it stopped?

Open the session to follow the conversation. Open one turn when you need the detail of a single exchange, such as a failure or an unexpected tool call.

Compact a long conversation

Long conversations can exceed the amount of context a model accepts. Compaction writes a summary of older messages. Later turns use the summary and recent messages instead of sending the entire older conversation to the model.

Compaction does not delete the original messages from the saved transcript. The session detail page places the older messages behind a compaction divider, where you can expand and inspect them.

StrategyBehavior
AutoCompact when the session reaches a saved percentage of the model's context capacity or an exact token threshold
ManualDo not compact at a threshold, but keep Compact now available
DisabledDo not compact and make Compact now unavailable

With Manual or Disabled, a long session can reach the model's context limit and cause a later turn to fail. Disabled is different from Manual because it also prevents a person from starting compaction.

To change one session:

  1. Open Session details.
  2. Click the Session settings icon in the session header.
  3. Choose the compaction strategy, threshold, and summary model.
  4. Click Save.

The confirmation reads Session settings updated. These settings affect only this session. Changing an agent's default later does not change sessions that already exist.

Click Compact now to summarize messages since the previous compaction. A Compaction started confirmation appears, and the transcript shows a compaction divider after the operation finishes. Compaction can run again as the conversation grows. It cannot reconstruct details that the summary omitted from a later model context, although the original saved messages remain readable.

Archive or delete a session

From the active Sessions list, open a row's action menu. Depending on its source, the menu calls the record a conversation or a run transcript:

  • Archive changes its status and removes it from the active list. Mobius retains the transcript, but the current app list has no archived filter. Copy the session ID before archiving if you may need to retrieve it through the Sessions API.
  • Delete opens a confirmation. The app removes the session from normal views and warns that it cannot be restored. Do not use Delete when Archive is sufficient.

In a direct chat, Session actions > Archive & start fresh archives the current session and opens an empty chat. The confirmation says Session archived. The replacement session is created only after you send the first message, and it receives a new session ID.

Recover a stuck direct chat

Use the normal Stop control first when a direct-chat turn is still running. Consider Force-unlock (stuck turn) only when the turn remains non-terminal and blocks new messages after that stop attempt.

From the chat or session header:

  1. Open Session actions.
  2. Choose Force-unlock (stuck turn).
  3. Read the confirmation and choose Force-unlock only if you accept the stated risk.

Success is reported as Session unlocked, and the composer becomes available for another message. Force-unlock stops every in-flight turn for that session. It cannot undo an external action that already completed.

Before you force-unlock a turn that called external actions, read its activity and check the destination system. Force-unlock ends the turn on the Mobius side only; anything it already sent, deleted, or purchased stays done.

Large action results

For actions configured as safe to shorten, Mobius keeps about 2,000 tokens in the transcript context and stores a reference to the larger result. The agent can fetch narrow ranges from that result, but the larger stored copy expires after about seven days. The compact transcript entry remains.

Save source files or results that must remain available as an artifact or in the system that owns them. The Sessions and turns API guide documents streaming, compaction, result retrieval, and recovery behavior for applications.

Next