mirror of
https://github.com/letta-ai/claude-subconscious.git
synced 2026-04-25 17:04:56 +02:00
fix: revert to resumeSession(agentId) — API conversations incompatible with SDK
resumeSession(conversationId) silently fails (0 chars response) when the conversation was created via the raw Letta API. The SDK needs to manage its own conversation. Revert to agentId for now. Written by Cameron ◯ Letta Code "Move fast and fix things." - Unknown
This commit is contained in:
@@ -61,13 +61,13 @@ async function sendViaSdk(payload: SdkPayload): Promise<boolean> {
|
||||
}
|
||||
// 'full' mode: no allowedTools restriction (all tools available)
|
||||
|
||||
log(`Creating SDK session for conversation ${payload.conversationId} (mode: ${payload.sdkToolsMode})`);
|
||||
log(` agent: ${payload.agentId}`);
|
||||
log(`Creating SDK session for agent ${payload.agentId} (mode: ${payload.sdkToolsMode})`);
|
||||
log(` cwd: ${payload.cwd}`);
|
||||
log(` allowedTools: ${payload.sdkToolsMode === 'read-only' ? readOnlyTools.join(', ') : 'all'}`);
|
||||
|
||||
// Resume the specific conversation so messages appear in the same thread on app.letta.com
|
||||
const session = resumeSession(payload.conversationId, sessionOptions);
|
||||
// Use agentId — the SDK creates/manages its own conversation.
|
||||
// The Letta API conversation (payload.conversationId) is incompatible with SDK sessions.
|
||||
const session = resumeSession(payload.agentId, sessionOptions);
|
||||
|
||||
try {
|
||||
log(`Sending message (${payload.message.length} chars)...`);
|
||||
|
||||
Reference in New Issue
Block a user