Layered Main-Session and Thread Routing Cuts Agent Token Costs
Baoyu outlines a layered routing pattern for multi-agent sessions: the main session only classifies and dispatches tasks, so a mid-tier model like Sonnet 5.5 suffices, while stronger models such as Opus 5.5 handle work inside threads. Paired with differentiated prompt-caching tactics, sending only recent messages plus session retrieval after cache expiry and compressing thread context near cache TTL, overall token consumption stays manageable.
Related Entities
Full Report
宝玉 (@dotey) · 2026-11-16 02
主会话 + Thread 的模式,优化好的话 Token 消耗其实还好。
首先主会话反而不需要特别强的模型,Sonnet 5.5 这个级别都够用了,因为它的主要职责是甄别和路由,或者说调度。
就跟公司前台一样,你不需要招一个专家,只要知道什么任务该找谁。
主会话里面很多任务都可以让 Thread 去完成,反倒是 Thread 应该用相对强一些的模型。当然更科学的办法是主会话在调度的时候根据任务难度去选择合适的模型。
比如我在用 Claude Project 的时候,主会话是 Sonnet 5.5,子任务是 Opus 5.5。
另外就是 Prompt Caching 的利用。
像主会话这种,特点是偶尔来个消息,很难利用好缓存,所以缓存如果过期了,不应该跟把所有历史会话和工具调用都发过去,而是只把最新的几条消息记录发过去,再配合 Session 的检索工具,可以很容易的收集齐上下文。
而对于 Thread,则是像传统的 Session 会话,会集中时间有很多对话,通常 Cache 利用率很高,但是也可能会出现缓存过期后又来新的消息,所以最佳策略是在缓存快过期的时候,比如 50 分钟(如果缓存一个小时的话)的时候,压缩一下上下文。
↳ 引用 @GaryZhang124 (Gary Zhang): 问题是,Grok bot这个如果走单主会话的交互太耗额度了。https://x.com/dotey/status/2121434782433190063?a=50n4z6sX4Vvaup1hVn0&s=20