Replies: 3 comments
|
I think there may be a deeper simplification behind WorkHub. If we start from the agent loop, a Session is primarily a container for an ordered set of messages plus an execution boundary. Once Work becomes the durable user-facing concept, it is worth asking whether Session still needs to be a primary domain entity at all. A possible alternative model is:
In this model, Session can remain as a compatibility or UI projection, but it no longer has to be the storage or authority primitive. The underlying structure would not really be a single transcript. Physically, it can be an append-only sequence, but logically it is a temporal causal graph. Events need typed relationships such as:
For example, if message C was generated because message B was retrieved into the previous context, that should be represented through a persisted Context Snapshot rather than inferred later from transcript proximity. This would make agent behavior auditable and replayable. From this perspective, WorkHub routing becomes a large-scale Event Log search problem, but I think it should be split into two distinct retrieval stages:
This separation matters because global target identification and execution-context construction have different safety requirements. A global message search should not automatically become execution authority or inject unrelated raw history into the agent context. User confirmation can then be risk-based:
Time also needs richer treatment than a general recency score. Recent conversational messages may decay quickly, while decisions, unresolved permissions, and architectural constraints remain important. The system should distinguish event time from ingest time and understand So the deeper question may be:
Even if Session is removed as a concept, its operational responsibilities do not disappear. Execution isolation, permissions, cancellation, recovery, and concurrency would move explicitly into Run, Authority Snapshot, and causal-branch primitives. For an MVP, the existing one-Work/one-Session implementation may still be the practical path. However, keeping |
|
Thanks, this pushed me to go read the actual source code. The read side of your framing already runs inside Maka. The execution domain is an append-only per-run ledger with a monotonic sequence, plus a projection cache keyed by session and event type. The same events/projections pair shows up again for task runs and workflow plans. Canonical terminal turn status is computed from the immutable runtime event ledger, not read from a stored snapshot. For a completed run, the canonical read model itself declares What does not exist is the recall layer. No full-text, BM25, or semantic index anywhere in the tree. Search today is a bounded substring scan. That gap is roughly WorkHub sized: a read model that can answer where things stand without opening every session. The write side is where Session stops being a cache and becomes the authority. Sessions own the model, connection, backend, archive state, the permission boundary, and the working-directory binding. Those are not projections. File contents, external system state, and manual edits live outside the event ledger, and no replay rebuilds them. One detail in the code makes this concrete: root turn admissions per session must form a single linear chain, and branching is a hard error. A recall layer can rank events, but it cannot decide who appends the next root turn. That arbitration is the real thing a Session-less design has to re-home, not the display layer. So on the read side, Session as navigation should fold into a projected WorkHub over the event feed. On the write side, the question is not whether Session disappears, but which authority takes over lifecycle, boundary evolution, recovery identity, and turn-append arbitration. For an MVP, WorkHub as a projection over Sessions is the smallest viable step, and keeping 中文版: 顺着你这个角度去看代码,读侧的部分其实 Maka 已经在做了。执行域就是按 run 追加的不可变事件表,配一张按 session 和事件类型缓存最新值的投影表,task run 和 workflow plan 也走同一套 events/projections 结构。turn 的终态(完成/失败/中断)是从不可变运行时事件里现算出来的,不读现成快照;已完成 run 的权威读模型自己也声明 真正缺的是召回层。整个仓库没有全文索引、没有 BM25、没有向量索引,现在的搜索就是个限范围的子串扫描。这个洞正好是 WorkHub 该填的:不用打开每个 session 就能回答"现在到哪了"的读模型。 写侧才是 Session 从缓存变成权威的地方。模型、连接、backend、归档状态、权限边界、工作目录绑定都挂在 Session 上;这些不是投影。文件内容、外部系统状态、用户手动改的东西都不在事件账本里,重放重建不出来。 代码里有个更直接的证据:每个 session 的 root turn 受理必须构成唯一一条线性链,分叉直接报错。召回能排候选,但仲裁不了"下一条 root turn 谁写"。这才是去 Session 之后真正要迁移的东西,不是展示层。 所以读侧,Session 作为导航应当融进事件流上的 WorkHub 投影;写侧,问题不是 Session 要不要消失,而是生命周期、边界演进、恢复身份、turn 追加仲裁这些职责交给谁。MVP 里 WorkHub 作为 Session 之上的投影是最小可行的口径, Note: this reply was drafted with AI assistance, reviewed by the author against the source, and edited by hand before posting. |
|
Reading this together with the proposal and Li's event-log framing, here is our take and where it agrees or splits with the other two. Our proposal: a Hub main agent, not a new Work entity. We want to keep the existing Session/Project model untouched and add one permanent conversational entry: a single global main agent living in a persistent Hub session. The user talks only to this agent. Work is not a new domain abstraction; it is whatever the main agent decides to orchestrate. Each work is executed by subagents (existing Sessions are simply treated as agent units too), each gets a sandbox and an automatically scoped task, failures are handled by the main agent (retry, reroute, degrade) instead of being pushed to the user, and the user sees results only. The UI is a conversation stream, mobile-first, with work details hidden until asked. Where we agree with the WorkHub proposal:
Where we differ from the proposal:
Where we agree with Li's event-log view:
Where we split with Li:
What all three share: users should not manually manage Session routing; the bottom layer is an event stream; confirmation should be risk-based and reversible. Open questions for the discussion: is Work worth keeping as its own entity, or is a main agent's orchestration view enough? And is large-scale retrieval the core mechanism, or is orchestration? 中文版: 结合李坤那条事件流的视角,我把我们的方案跟两边摆在一起,说说异同。 我们的主张:一个 Hub 主 Agent,不造 Work 实体。 现有 Session/Project 完全不动,在上面加一个永久对话入口:全局唯一的主 Agent,住在常驻的 Hub 会话里,用户只跟它说话。Work 不是新的领域实体,只是主 Agent 眼里的一个编排容器。每件工作由子 Agent 干(历史 Session 也统一当作 Agent 单位),每个子 Agent 拿到沙箱、范围自动划定,出错由主 Agent 自己编排(重试、换路、降级),不推到用户面前,用户只看结果。界面就是对话流,移动优先,细节默认藏着。 和 WorkHub 提案一致的地方:
和提案不一样的地方:
和李坤一致的地方:
和李坤分岔的地方:
三方共同点:用户不该手动管 Session 路由;底层都是事件流;确认要风险分级、可逆。 想请大家讨论:Work 值不值得做成独立实体,还是主 Agent 的编排视图就够?核心机制到底是检索还是编排? Note: this reply was drafted with AI assistance, reviewed by the author, and edited by hand before posting. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Maka currently organizes work through Projects and Sessions. This gives each task a clear context, permission boundary, execution history, and recovery path, but it also requires users to manage routing themselves.
When working on several things, users must repeatedly remember:
This is navigation and context-management work rather than the user's actual work.
The cost is particularly visible for non-technical users and on mobile devices, where navigating a hierarchy of Projects and Sessions is more expensive.
Desired outcome
Maka should provide one permanent conversational entry point where users can understand and advance all their work without manually selecting a Session first.
The proposed user-facing name is WorkHub. "Unified Session" refers to the current experiment, while "Work Orchestrator" describes the internal coordination role.
From WorkHub, a user should be able to:
The user should manage goals and priorities. Maka should manage routing.
Proposed user experience
WorkHub should behave like an ordinary Maka conversation rather than a separate administrative dashboard.
A user message can produce one of four outcomes:
Discussion
Exploratory or ambiguous conversation remains in WorkHub. Maka does not create a Work merely because a topic was mentioned.
Resume an existing Work
When the intended Work can be identified with sufficient confidence, Maka binds the message to the Session that owns that Work.
Create a new Work
When the user expresses a clear execution goal and no suitable Work exists, Maka creates a normal Session and presents it as a new Work.
Clarify
When multiple targets are plausible, especially before file changes or external side effects, Maka asks the user to select the intended Work instead of silently guessing.
Each Work is displayed as an independent message block. Project and Work information should remain visible but visually secondary. WorkHub should otherwise reuse the normal Session layout, message components, composer, permissions, and interaction cards.
Product and architecture principles
Sessions remain authoritative
This proposal does not replace or merge ordinary Sessions.
Each Session continues to own its:
WorkHub is an orchestration and projection layer over those Sessions.
Routing is bounded
A model must not invent Session identities or freely choose arbitrary execution targets.
Existing deterministic filtering should produce a bounded set of Work candidates. Semantic intent recognition may select from those candidates, request clarification, create a new Work, keep the message as Discussion, or coordinate several explicit Works.
When the cost of a wrong binding is asymmetric, Maka should prefer one clarification question over confident misrouting.
One executable turn has one Work authority
A message that changes files or produces external effects must be bound to one Work before execution.
Requests involving several Works should be decomposed into explicit Work turns and coordinated through the existing Graph dependency model.
The feature must remain reversible
Users can always open an ordinary Session and continue working there.
Disabling WorkHub restores the ordinary navigation behavior without deleting the Works, Sessions, or history created through it.
Alternatives or workarounds
Improve Session search and navigation
Better search and faster switching reduce the number of clicks, but users still need to understand the Session structure and decide where every message belongs. This reduces switching cost without removing routing as a user responsibility.
Merge all Sessions into one context
A single transcript would appear seamless, but it would mix unrelated context, permissions, recovery state, and deletion semantics. It would also create an indefinitely growing model context.
Add a work-status dashboard
A dashboard helps users inspect progress, but users must still leave it and find the appropriate Session before they can continue working. It solves visibility without providing one place to advance the work.
Why WorkHub
WorkHub combines global work visibility with a conversational control surface while preserving independent Session authorities.
Users can understand, continue, create, and coordinate all their work in one place without managing the underlying Session routing.
Experimental implementation
A working experiment currently demonstrates:
The experiment is evidence of feasibility, not a predetermined final implementation.
Illustrated overview:
https://github.com/ARE404/maka-agent/blob/codex/unified-session-experiment/UNIFIED_SESSION_EXPERIMENT.zh-CN.md
Experimental branch:
https://github.com/ARE404/maka-agent/tree/codex/unified-session-experiment
Scope
The intended product contract covers all Maka Workspaces registered in the application.
The first production implementation may be delivered in smaller slices, but it should not establish a model that makes cross-Workspace work impossible later.
Non-goals
Open questions
Feedback on the user model, terminology, safety boundaries, and rollout scope is welcome.
All reactions