Feedback Type
Product Bug
Impact
Medium - Affects secondary use cases
Bob Product
Bob Shell
Bob Version
2.0.0
Mode (if applicable)
No response
Issue Summary
The tasks.retentionDays setting is offered in /settings and is written to ~/.bob/settings/settings.json, but nothing in Bob Shell 2.0.0 reads it. The task-pruning routine TaskStore.cleanupOldTasks() exists but is never called, so completed/old tasks appear to be kept forever regardless of the configured value.
Detailed Description
What I did
- Ran
/settings in Bob Shell 2.0.0 and changed Task Retention (days) from the default 14 to 365.
- Confirmed it was persisted —
~/.bob/settings/settings.json now contains:
{
"tasks": { "retentionDays": 365 },
"licenseConsent": true,
"bobShell": { "lastRunVersion": "2.0.0" }
}
- Wanted to know when the deletion actually runs, so I looked for the code that consumes the value.
What I found
The setting is never read. In dist/bob.js (18 MB, the only JS file in the package) the string retentionDays occurs exactly twice:
- the default value —
tasks:{retentionDays:14}
- the
/settings item definition — label: "Task Retention (days)", description: "How long completed tasks are kept"
There is no third occurrence, i.e. no code reads the configured value.
The pruning routine exists, but has no caller. TaskStore.cleanupOldTasks(ms) is implemented:
cleanupOldTasks(e) {
let n = Date.now() - e,
a = this.db.prepare(
"SELECT id FROM tasks WHERE updated_at < ? AND is_pinned = 0 AND parent_id IS NULL"
).all(n);
if (a.length === 0) return 0;
// ... DELETE FROM tasks WHERE parent_id IN (...) / WHERE id IN (...)
}
The identifier cleanupOldTasks occurs exactly once in the bundle — the definition only. For comparison, in the same bundle:
| identifier |
occurrences |
meaning |
cleanupOldTasks |
1 |
definition only, no caller |
cleanupStaleTasks |
2 |
definition + call site |
getUserPrompts |
2 |
definition + call site |
importLegacyBobCodeTasks |
4 |
definition + call sites |
dist/bob.js is the only JS in the package (no workers or side bundles), so the call site is not somewhere else.
Expected behaviour
Completed/old tasks are pruned according to tasks.retentionDays, as the /settings description implies.
Actual behaviour
Tasks are apparently retained indefinitely in Bob Shell; changing the setting has no effect. On my machine ~/.bob/db/bob.db holds every task created since the 2.0.0 upgrade, all with status = 'active' and time_archived = NULL.
Two smaller points in the same area
- The description does not match the implementation.
cleanupOldTasks filters on updated_at, not on status, so it would delete any old root task — not only "completed" ones. Either the wording or the query should change.
- Pinned tasks are excluded (
is_pinned = 0), but Bob Shell has no way to pin. is_pinned is added by a migration and can be set through the store API, yet none of the 17 Shell slash commands exposes pinning. If pinning is the intended escape hatch from retention, Shell users currently cannot use it.
Note
I have heard from one user of the Bob IDE extension who lost completed tasks, so this may well be Shell-only — the IDE ships as a separate package and I have not inspected it. If that is the case, the two products behave differently under the same setting name, which is worth aligning.
Environment
System:
- OS: Windows_NT 10.0.26200
- RAM: 32GB
- CPU: x64 (11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz)
- Shell: powershell
- Node.js: v22.22.2
- Bob Shell: 2.0.0 (installed globally from the .tgz)
Project:
- Project Type: Not project-specific - the behaviour is in Bob Shell itself (a small documentation/scripting repo)
- Project Size: Small (<100 files)
- Primary Language: Markdown / Python
MCP Configuration (if applicable)
No response
Feedback Type
Product Bug
Impact
Medium - Affects secondary use cases
Bob Product
Bob Shell
Bob Version
2.0.0
Mode (if applicable)
No response
Issue Summary
The
tasks.retentionDayssetting is offered in/settingsand is written to~/.bob/settings/settings.json, but nothing in Bob Shell 2.0.0 reads it. The task-pruning routineTaskStore.cleanupOldTasks()exists but is never called, so completed/old tasks appear to be kept forever regardless of the configured value.Detailed Description
What I did
/settingsin Bob Shell 2.0.0 and changed Task Retention (days) from the default14to365.~/.bob/settings/settings.jsonnow contains:{ "tasks": { "retentionDays": 365 }, "licenseConsent": true, "bobShell": { "lastRunVersion": "2.0.0" } }What I found
The setting is never read. In
dist/bob.js(18 MB, the only JS file in the package) the stringretentionDaysoccurs exactly twice:tasks:{retentionDays:14}/settingsitem definition —label: "Task Retention (days)",description: "How long completed tasks are kept"There is no third occurrence, i.e. no code reads the configured value.
The pruning routine exists, but has no caller.
TaskStore.cleanupOldTasks(ms)is implemented:The identifier
cleanupOldTasksoccurs exactly once in the bundle — the definition only. For comparison, in the same bundle:cleanupOldTaskscleanupStaleTasksgetUserPromptsimportLegacyBobCodeTasksdist/bob.jsis the only JS in the package (no workers or side bundles), so the call site is not somewhere else.Expected behaviour
Completed/old tasks are pruned according to
tasks.retentionDays, as the/settingsdescription implies.Actual behaviour
Tasks are apparently retained indefinitely in Bob Shell; changing the setting has no effect. On my machine
~/.bob/db/bob.dbholds every task created since the 2.0.0 upgrade, all withstatus = 'active'andtime_archived = NULL.Two smaller points in the same area
cleanupOldTasksfilters onupdated_at, not on status, so it would delete any old root task — not only "completed" ones. Either the wording or the query should change.is_pinned = 0), but Bob Shell has no way to pin.is_pinnedis added by a migration and can be set through the store API, yet none of the 17 Shell slash commands exposes pinning. If pinning is the intended escape hatch from retention, Shell users currently cannot use it.Note
I have heard from one user of the Bob IDE extension who lost completed tasks, so this may well be Shell-only — the IDE ships as a separate package and I have not inspected it. If that is the case, the two products behave differently under the same setting name, which is worth aligning.
Environment
System:
Project:
MCP Configuration (if applicable)
No response