Loading ACP sessions from disk
First complete Setting up Claude Code through ACP or Setting up Codex through ACP.
Inspect GtLACPClaudeCodeSessionStore
or GtLACPCodexSessionStore
to browse saved sessions.
claudeStore := GtLACPClaudeCodeSessionStore new read. claudeStore
codexStore := GtLACPCodexSessionStore new read. codexStore
Inspect a stored session and click Load session to open its ACP chat, or send GtLACPStoredSession>>#load
. Its type selects the matching client:
The default storage roots are ~/.claude and ~/.codex. Set CLAUDE_CONFIG_DIR or CODEX_HOME in GT's environment to use another location.
Replace the ID below to load a Claude Code session with GtLACPExternalSessionStore>>#loadSession:configureClient:
. The store finds the project directory and creates the matching client:
sessionId := 'your-session-id'.
session := claudeStore
loadSession: sessionId
configureClient: [ :client |
client configuration requestTimeout: 180 ].
session
For Codex, use codexStore in the same expression. Send GtLACPExternalSessionStore>>#read
again to refresh the list.
When only the ID is known, traverse both stores using GtLACPExternalSessionStore>>#sessionWithId:ifPresent:
:
sessionId := 'your-session-id'.
session := nil.
stores := {
GtLACPClaudeCodeSessionStore new read.
GtLACPCodexSessionStore new read }.
stores do: [ :store |
store
sessionWithId: sessionId
ifPresent: [ :storedSession |
session := store
loadSession: storedSession sessionId
configureClient: [ :client |
client configuration requestTimeout: 180 ] ] ].
session
Inspect Read problems if a session is missing. Loading requires a known project directory that still exists and an adapter that supports resuming the session.
To continue a closed GtLACPSession
, use GtLACPSession>>#reopen
. This keeps the existing conversation objects and requires an agent that supports resuming without history replay: