What happened?
When the Kanban server restarts, its in-memory map lastStartRequestByTaskId is cleared. If you then interact with an existing task (e.g., clicking on it or sending a message), the server fails with: No previous Cline session config is available for task c5c42.
Steps to reproduce
This occurs because restartTaskSession expects the start configuration to be present in lastStartRequestByTaskId. However, the task session history is already persisted inside the session's JSON structure under ~/.cline/data/sessions/.
Expected behavior
Solution & Implementation (by Antigravity Gemini Flash 3.5)
- In-Memory Session Restoration
We patched the restartTaskSession function in the global kanban module (cli.js) to dynamically reconstruct the configuration from the persisted session record if the in-memory entry is missing:
diff
async restartTaskSession(input) {
-
const lastStartRequest = this.lastStartRequestByTaskId.get(input.taskId);
-
-
throw new Error(`No previous Cline session config is available for task ${input.taskId}.`);
-
-
return await this.startTaskSession({
-
-
-
initialMessages: input.initialMessages,
-
-
mode: input.mode ?? lastStartRequest.mode
-
-
let lastStartRequest = this.lastStartRequestByTaskId.get(input.taskId);
-
-
-
const sessionHost = await this.ensureSessionHost();
-
const record2 = await this.findPersistedTaskSessionRecord(input.taskId, sessionHost);
-
-
-
-
cwd: record2.cwd || record2.workspaceRoot || record2.workspace_root,
-
providerId: record2.provider,
-
-
mode: record2.mode || input.mode || "act",
-
apiKey: record2.apiKey || "",
-
baseUrl: record2.baseUrl || "",
-
reasoningEffort: record2.reasoningEffort,
-
systemPrompt: record2.systemPrompt,
-
taskTitle: record2.metadata?.title || record2.taskTitle,
-
userInstructionService: record2.userInstructionService,
-
requestToolApproval: record2.requestToolApproval
-
-
this.lastStartRequestByTaskId.set(input.taskId, lastStartRequest);
-
-
-
console.error("Failed to reconstruct start request from persisted session:", e);
}
}
-
-
throw new Error(`No previous Cline session config is available for task ${input.taskId}.`);
-
-
return await this.startTaskSession({
-
-
-
initialMessages: input.initialMessages,
-
-
mode: input.mode ?? lastStartRequest.mode
-
Kanban version
0.1.68
Environment
mac OS Tahoe 26.5.1, Node 22.18
What happened?
When the Kanban server restarts, its in-memory map lastStartRequestByTaskId is cleared. If you then interact with an existing task (e.g., clicking on it or sending a message), the server fails with: No previous Cline session config is available for task c5c42.
Steps to reproduce
This occurs because restartTaskSession expects the start configuration to be present in lastStartRequestByTaskId. However, the task session history is already persisted inside the session's JSON structure under ~/.cline/data/sessions/.
Expected behavior
Solution & Implementation (by Antigravity Gemini Flash 3.5)
We patched the restartTaskSession function in the global kanban module (cli.js) to dynamically reconstruct the configuration from the persisted session record if the in-memory entry is missing:
diff
async restartTaskSession(input) {
Kanban version
0.1.68
Environment
mac OS Tahoe 26.5.1, Node 22.18