Roo-Code: Task can't be opened

Which version of the app are you using?

3.3.9

Which API Provider are you using?

OpenRouter

Which Model are you using?

Gemini flash 2.0

What happened?

Sometimes, specific tasks can’t be opened. I created a task that generated a bug in my app, and to correct it, I had to reopen this task. The curious thing is that with this specific task, I couldn’t open it anymore.

Steps to reproduce

I haven’t identified a pattern to explain how to replicate the bug; this issue occurs suddenly.

Relevant API REQUEST output


Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26

Commits related to this issue

Most upvoted comments

@hannesrudolph if you know anyone interested in contributing or getting their feet wet in Roo development, then I think this is a relatively easy fix with low risk of side effects for someone who wishes to take it on.

JSONL would still be good though here is how it may apply

I am fine with converting the file format which will be nice and fast for the general case of append, but let’s do this in manageable steps:

What do you think about the following:

  1. start by implementing rename because it is trivial, which immediately closes this issue.

Then, in a separate PR:

  1. convert to JSONL
  2. keep the current rename function because future pull requests need to replace the entire file from time to time (eg, #1661)
  3. refactor the current implementation to append when appropriate

@KJ7LNW should we migrate to NDJSON or JSONL ?

Atomic rewrites (write to a temporary file, then rename) are still needed for full history modifications even if the file format is JSONL as I understand it.

JSONL would still be good though here is how it may apply:

Using JSONL with an append-only strategy for new entries means:

  • Each conversation entry is a separate JSON object on its own line.
  • New entries are appended to the file. If an interruption occurs, only the last appended line might be corrupted; previous entries remain intact.
  • The application can read the file line by line, skipping any single corrupted line, thus preserving most of the history and keeping the task openable.

Yes, most of my contexts are multiple days of continuous work which makes losing them very painful. Switching to appendonly is the way.

I think this happens when the JSON representing the task gets corrupted (for me at least, often when I try to terminate a task that’s using up too many resources or something). I would love to dig in deeper but haven’t had time yet…