You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f120b14
Browse filesBrowse the repository at this point in the historyBrowse files
> **Tracking Issue:**[#164 - Claude SDK: Monitor for chat history API availability](https://github.com/microsoft/Agent365-nodejs/issues/164)
210
+
211
+
### Current State
212
+
213
+
Unlike the OpenAI extension which provides `sendChatHistoryAsync` via `OpenAIConversationsSession.getItems()`, the Claude Agent SDK (`@anthropic-ai/claude-agent-sdk`) **does not expose programmatic access to conversation history**.
214
+
215
+
The SDK includes experimental `unstable_v2_*` session APIs (added in v0.1.54):
216
+
-`unstable_v2_createSession` - Creates a new session for multi-turn conversations
217
+
-`unstable_v2_resumeSession` - Resumes an existing session by ID
218
+
-`unstable_v2_prompt` - One-shot convenience function for single-turn queries
219
+
220
+
However, these APIs only provide:
221
+
-`session.send(message)` - Send a message to Claude
222
+
-`session.stream()` - Stream back response messages
223
+
-`session.close()` - Close the session
224
+
225
+
**There is no `session.getHistory()` or equivalent method** to retrieve past messages from a session. Sessions maintain context internally for Claude to reference, but this history is opaque to SDK consumers.
226
+
227
+
### Recommended Approach
228
+
229
+
Developers should use the generic `sendChatHistory` method from `@microsoft/agents-a365-tooling` by manually constructing `ChatHistoryMessage[]`:
0 commit comments