Repository navigation
Description
Problem
Runtime Host's Session catalog maintains three optional top-level filters:
isArchivedisFlaggedlabelSlug
Verified against origin/main at a75640f43b1cab4654595d30f2a40012deb5cb13.
Current shipped Desktop, CLI, and TUI callers request the complete catalog and perform their product selection locally. No production caller was found that supplies any of these three filters. Desktop preserves an optional IPC passthrough, but its renderer callers use sessions.list() without a filter.
Supporting the unused filter contract currently spans:
- core and Runtime Host protocol types and decoders;
- cursor identity and validation;
- Desktop Main passthrough;
- storage query construction;
- normalized label query tables and projections;
- associated indexes, triggers, migrations, and tests.
subagentParentSessionId is different: SessionManager.listChildSessions() has a current internal demand for it and it should remain.
Proposed change
Remove the unsupported-demand catalog filters isArchived, isFlagged, and labelSlug.
Once labelSlug is gone, remove storage representations maintained only for label lookup, including session_metadata_labels, session_catalog_label_projection, and their dedicated synchronization machinery.
Preserve:
SessionHeader.isArchived,isFlagged, andlabels;- archive, flag, and label mutation behavior;
- catalog projection of those values;
- the internal
subagentParentSessionIdfilter.
Acceptance criteria
- Shipped Desktop, CLI, and TUI behavior remains unchanged.
- The three unused filters are removed across protocol, coordinator, Desktop IPC, and storage.
-
subagentParentSessionIdfiltering remains supported. - Label query replicas and their maintenance machinery are removed.
- Existing Session labels, flags, and archive state remain readable and mutable.
- Existing stores migrate without losing Session metadata.
- Focused storage, Runtime Host protocol, Desktop, and formatting checks pass.
Capability intentionally removed
A protocol client can no longer ask Runtime Host to filter the catalog by archive state, flag state, or one label. Such a client must read the catalog and filter locally.
No shipped client currently depends on that capability. Because this narrows a wire contract, evidence of an external or extension consumer would be a reason to retain it.
Non-goals
- Deciding whether generic Session labels should remain a public mutation contract.
- Removing
isArchived,isFlagged, orlabelsfrom Session metadata. - Changing product-side archived-task or pinned-task behavior.
- Removing child-Session lookup.
Feedback wanted
Does any supported external Runtime Host client depend on these filters?
Lazy consensus, 72 hours. On GitHub rather than dev@ because the podling mailing lists are not available yet (#2974, Phase 1).
This issue was identified and drafted with AI assistance (Codex) against origin/main at a75640f43b1cab4654595d30f2a40012deb5cb13. A human contributor reviewed the analysis and owns the submission.
Activity
somewan820 commentedon Aug 17, 2026
I'll take this. I will remove the three unused Session catalog filters (isArchived, isFlagged, labelSlug) across protocol, coordinator, Desktop IPC, and storage, keep the internal subagentParentSessionId filter, and run the focused storage, Runtime Host protocol, Desktop, and formatting checks per the acceptance criteria.
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器
refactor!(session-catalog): 移除会话目录未使用的归档/标记/标签过滤器