github / github/copilot-cli

/resume fails after CLI restart on Windows when session event contains raw U+2028

Aberta
#2,658 0 comentários 0 reações 0 responsáveis Ver no GitHub
area:platform-windows area:sessions
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

## Summary
After restarting GitHub Copilot CLI on Windows, I was unable to resume the previous session because the saved session file appears to be corrupted.

## Environment
- GitHub Copilot CLI: 1.0.24
- OS: Windows
- Shell: PowerShell

## Repro steps
1. Start a Copilot CLI session in a local repository.
2. Do some work in the session.
3. Restart the CLI.
4. Try to resume the prior session using `/resume`.

## Expected
The previous session should be available and resume successfully with its saved context.

## Actual
Resume fails and reports that the session file is corrupted.

## Error shown by the CLI
```text
Failed to resume session: Error: Session file is corrupted (line 9316: SyntaxError: Unterminated string in JSON at position 2716 (line 1 column 2717))
```

## Additional context from local inspection
The process log reported that resume failed while parsing:
- session `a44946c9-5579-44a6-8a75-87fb6d680bf3`
- file `...\\.copilot\\session-state\\a44946c9-5579-44a6-8a75-87fb6d680bf3\\events.jsonl`
- event line `9316`
- event type `hook.start`

I inspected that record locally and found a raw Unicode line-separator character `U+2028` at the reported parse position (`2716`).

Relevant excerpt from the record:
```text
... ![](/static/assets/effectsvector.50f5035.svg)\n\n## Effects that polish,transform, or break the rules\n\nWith a full suite of effects, FL Studio lets you refine ...
```

The `events.jsonl` file had about 13,351 lines, and this appears to be the only `U+2028` / `U+2029` separator found in the failing record.

## Notes
- I hit this while troubleshooting MCP reload behavior for a local project, but the resume failure itself seems like a standalone CLI issue.
- I was not able to recover the previous session through resume.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start with the /resume path that reads the session-state events.jsonl file, then reproduce the failure using the reported hook.start event containing raw U+2028. Verify that session events with Unicode line-separator characters remain valid JSONL and that the affected session resumes successfully without reporting corruption.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
powershell
Domínio
cli
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
58/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.