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
- fix: use safeWriteJson for all JSON file writes (#3772) * feat: Add safeWriteJson utility for atomic file operations Implements a robust JSON file writing utility that: - Prevents concurrent writes ... — committed to RooCodeInc/Roo-Code by KJ7LNW a year ago
- fix: use safeWriteJson for all JSON file writes This change refactors all direct JSON file writes to use the safeWriteJson utility, which implements atomic file writes to prevent data corruption duri... — committed to RooCodeInc/Roo-Code by deleted user 2 years ago
- fix: race condition in safeWriteJson directory handling Fix race condition where safeWriteJson would fail with ENOENT errors during lock acquisition when the parent directory was just created. The i... — committed to RooCodeInc/Roo-Code by deleted user a year ago
@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.
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:
Then, in a separate PR:
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:
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…