anthropics / anthropics/claude-agent-sdk-typescript

sessions-index.json not updated by SDK, only by CLI

Abierto
#164 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Shell
Estrellas
1.8k
Forks
226
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The Claude Code CLI stores meta-data for each session it creates or updates in `~/.claude/projects//sessions-index.json`.
When using the SDK to resume any of the sessions in the project directory or create new ones, the `sessions-index.json` is not updated.
This breaks the ability to use the SDK and the Claude Code CLI interchangebly - after using the SDK it's not possible to resume in the CLI any of the sessions created by the SDK since they won't appear in the index file.

Steps to reproduce:

```
import { query } from '@anthropic-ai/claude-agent-sdk';
const q = query({
prompt: 'What is 1 + 1?'
});
for await (const msg of q) {
console.log(msg);
}
```

observe how the `sessions-index.json` file for the project is not updated or created if it's missing

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.