apache / apache/maka

fix(desktop): archived sessions can remain selected and trigger Skills and Plan queries

Open
#4,430 2 comments 0 reactions 1 assignee Claimed by @Phoenix500526 View on GitHub
bug
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

### What happened

When the currently selected session is archived, the renderer may continue treating it as active long enough to send automatic Skills and Plan queries, which the Host rejects because the session is already archived. After restart, startup selection may also select the most recent session even when it is archived, leaving the archived conversation visible and triggering the same errors again. Archived sessions should not receive automatic queries, and startup selection should only consider active sessions

### How to reproduce

1. Run Maka Desktop with multiple sessions.
2. Select the most recent session.
3. Archive that session.
4. Check the terminal output for Skills or Plan query errors.
5. Quit and restart the app.
6. Observe that the archived session may be selected again and the errors reappear.

### Environment

- Head Commit: 54015e45e
- OS version: Tahoe 26.6.2
- Surface: Desktop
- Node.js: v24.16.0

### Logs, screenshots, or additional context

```bash
ps://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports
11:45:06 PM [vite] (client) hmr update /app-shell.tsx
Error occurred in handler for 'plan-mode:getState': RuntimeHostOperationError: Session is archived
at #acceptResponse (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:354:24)
at #readResponses (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:312:37)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
operation: 'plan.query',
code: 'session_archived'
}
Error occurred in handler for 'skills:listInvocable': RuntimeHostOperationError: Skill catalog operation failed
at #acceptResponse (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:354:24)
at #readResponses (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:312:37)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
operation: 'skill.catalog.invocable.query',
code: 'internal_failure'
}
Error occurred in handler for 'skills:listInvocable': RuntimeHostOperationError: Skill catalog operation failed
at #acceptResponse (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:354:24)
at #readResponses (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:312:37)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
operation: 'skill.catalog.invocable.query',
code: 'internal_failure'
}
Error occurred in handler for 'skills:listInvocable': RuntimeHostOperationError: Skill catalog operation failed
at #acceptResponse (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:354:24)
at #readResponses (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:312:37)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
operation: 'skill.catalog.invocable.query',
code: 'internal_failure'
}
Error occurred in handler for 'skills:listInvocable': RuntimeHostOperationError: Skill catalog operation failed
at #acceptResponse (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:354:24)
at #readResponses (file:///Users/phoenix/workspace/agent-repos/maka-agent/packages/runtime-host/dist/client/connection.js:312:37)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
operation: 'skill.catalog.invocable.query',
code: 'internal_failure'
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.