All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.
Rust
fix(search,mcp): address the Codex review of today's changes
Corey Chiub4a189fea4e5
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5c70942..f23e211 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,9 +6,9 @@- Fix: ⌘K / Ctrl+K results show the `@host` badge for sessions mirrored from a remote host- Fix: Insights no longer counts a session twice when it is mirrored from more than one host- Fix: Settings → Data includes the remote mirrors in the storage size-- New: `wake_get_session` and `wake-cli show` can read a subagent transcript — the main transcript now lists their ids; pass one as `subagent` / `--subagent`+- New: `wake_get_session` and `wake-cli show` can read a subagent transcript — the main transcript now lists their ids; pass one as `subagent` / `--subagent`, or `*` to list them all- Update: search favours recently active sessions a little — an equally good match from last week now outranks one from last year, in ⌘K / Ctrl+K, `wake_search` and `wake-cli search`-- Fix: an agent's own Wake lookups (the `wake_*` tools, `wake-cli` commands) no longer show up as search hits in its session+- Fix: an agent's own Wake lookups (the `wake_*` tools, `wake-cli` commands) no longer show up as search hits in its session; existing indexes are re-derived once on the first launch after upgrading- Update: search now matches session titles too, in ⌘K / Ctrl+K, `wake_search` and `wake-cli search` — title hits come first and open the session at its start## [0.6.4] — 2026-09-14diff --git a/crates/wake-core/src/adapters/mod.rs b/crates/wake-core/src/adapters/mod.rsindex 0e9e527..c821241 100644--- a/crates/wake-core/src/adapters/mod.rs+++ b/crates/wake-core/src/adapters/mod.rs@@ -429,7 +429,7 @@ pub(crate) fn units_from_messages(messages: &[TranscriptMessage]) -> Vec<IndexUn.filter_map(|m| {let mut parts = vec![m.text.clone()];for tc in &m.tool_calls {- if is_wake_lookup(&tc.name, &tc.input_preview) {+ if is_wake_lookup(tc) {continue;}parts.push(format!("{} {}", tc.name, tc.input_preview));@@ -465,18 +465,44 @@ pub fn expand_tilde(p: &str) -> String {}}+/// Wake 自己的两个命令行二进制;在 shell 工具的 command 里以整词出现即视为在查 Wake+const WAKE_BINARIES: [&str; 2] = ["wake-cli", "wake-mcp"];+/// 这次工具调用是不是 agent 在查 Wake:MCP 工具按 `mcp::tools::NAMES` 认(加第五家-/// 自动覆盖),客户端会给名字加-/// 自己的前缀(Claude Code / Codex 是 `mcp__wake__wake_search`,别家形态不一),所以-/// 只看结尾、并要求前一个字符不是字母数字(`awake_search` 不算);shell 工具(Bash 等)-/// 看输入预览里是否以整个词的形态出现 wake-cli / wake-mcp-fn is_wake_lookup(tool_name: &str, input_preview: &str) -> bool {+/// 自动覆盖),客户端会给名字加自己的前缀(Claude Code / Codex 是 `mcp__wake__wake_search`,+/// 别家形态不一),所以只看结尾、并要求前一个字符不是字母数字(`awake_search` 不算);+/// 命令行则要求 wake-cli / wake-mcp 以整词出现在 shell 工具的 **command 字段**里——+/// Grep 的 pattern、Read 的路径提到 wake-cli 是在读代码,不是查询(Codex review 2026-09-14)+fn is_wake_lookup(tc: &ToolCallView) -> bool {crate::mcp::tools::NAMES.iter()- .any(|t| ends_with_word(tool_name, t))- || ["wake-cli", "wake-mcp"]+ .any(|t| ends_with_word(&tc.name, t))+ || (WAKE_BINARIES.iter()- .any(|bin| names_binary(input_preview, bin))+ .any(|bin| names_binary(&tc.input_preview, bin))+ && command_names_binary(tc))+}++/// 预览(对 shell 工具就是命令的前 200 字)提到了二进制名之后再看结构:只有输入对象的+/// `command`(字符串或 argv 数组,各家 shell 工具都这么叫)里出现才算执行了 Wake。+/// 输入没有结构可看(None,或被截断到解析不了)时退回预览判断+fn command_names_binary(tc: &ToolCallView) -> bool {+ let Some(raw) = tc.input.as_deref() else {+ return true;+ };+ let Ok(serde_json::Value::Object(obj)) = serde_json::from_str::<serde_json::Value>(raw) else {+ return true;+ };+ let text = match obj.get("command") {+ Some(serde_json::Value::String(s)) => s.clone(),+ Some(serde_json::Value::Array(parts)) => parts+ .iter()+ .filter_map(serde_json::Value::as_str)+ .collect::<Vec<_>>()+ .join(" "),+ _ => return false,+ };+ WAKE_BINARIES.iter().any(|bin| names_binary(&text, bin))}fn ends_with_word(s: &str, word: &str) -> bool {@@ -500,6 +526,18 @@ fn names_binary(preview: &str, bin: &str) -> bool {mod tests {use super::*;+ fn tc(name: &str, preview: &str, input: Option<&str>) -> ToolCallView {+ ToolCallView {+ id: String::new(),+ name: name.to_string(),+ input_preview: preview.to_string(),+ input: input.map(String::from),+ output: None,+ is_error: false,+ sidechain_ref: None,+ }+ }+fn msg(seq: i64, text: &str, tools: &[(&str, &str)]) -> TranscriptMessage {TranscriptMessage {seq,@@ -509,15 +547,7 @@ mod tests {truncated: false,tool_calls: tools.iter()- .map(|(name, preview)| ToolCallView {- id: String::new(),- name: name.to_string(),- input_preview: preview.to_string(),- input: None,- output: None,- is_error: false,- sidechain_ref: None,- })+ .map(|(name, preview)| tc(name, preview, None)).collect(),thinking: None,timestamp: None,@@ -566,21 +596,58 @@ mod tests {#[test]fn wake_lookup_detection_is_narrow() {- assert!(is_wake_lookup("mcp__wake__wake_list_projects", ""));- assert!(is_wake_lookup("wake_search", "x"));+ let lookup = |name: &str, preview: &str, input: Option<&str>| {+ is_wake_lookup(&tc(name, preview, input))+ };+ assert!(lookup("mcp__wake__wake_list_projects", "", None));+ assert!(lookup("wake_search", "x", None));assert!(- is_wake_lookup("mcp_wake_wake_get_session", ""),+ lookup("mcp_wake_wake_get_session", "", None),"别家客户端的前缀形态");- assert!(is_wake_lookup("Bash", "cd repo && wake-cli projects"));- assert!(is_wake_lookup("Bash", "C:\\Wake\\wake-cli.exe sessions"));- assert!(is_wake_lookup(+ // 没有结构化输入可看时按预览判+ assert!(lookup("Bash", "cd repo && wake-cli projects", None));+ assert!(lookup("Bash", "C:\\Wake\\wake-cli.exe sessions", None));+ assert!(lookup(+ "Bash",+ "WAKE=/Applications/Wake.app/Contents/MacOS/wake-cli",+ None+ ));+ assert!(!lookup("Bash", "cargo test -p wake-core", None));+ assert!(!lookup("Bash", "wake-cli-old --help && wake-clip", None));+ assert!(!lookup("mcp__other__awake_search", "", None));+ assert!(!lookup("Edit", "crates/wake/src/settings.rs", None));+ // 有结构化输入时只认 command 字段:读代码、搜代码提到 wake-cli 不是查询+ assert!(lookup("Bash",- "WAKE=/Applications/Wake.app/Contents/MacOS/wake-cli"+ "wake-cli search \"二维码\"",+ Some(r#"{"command": "wake-cli search \"二维码\"", "description": "search history"}"#)+ ));+ assert!(+ lookup(+ "shell",+ "bash -lc wake-cli sessions --limit 5",+ Some(r#"{"command": ["bash", "-lc", "wake-cli sessions --limit 5"]}"#)+ ),+ "Codex 的 argv 数组形态"+ );+ assert!(!lookup(+ "Grep",+ "wake-cli",+ Some(r#"{"pattern": "wake-cli", "path": "docs"}"#)));- assert!(!is_wake_lookup("Bash", "cargo test -p wake-core"));- assert!(!is_wake_lookup("Bash", "wake-cli-old --help && wake-clip"));- assert!(!is_wake_lookup("mcp__other__awake_search", ""));- assert!(!is_wake_lookup("Edit", "crates/wake/src/settings.rs"));+ assert!(!lookup(+ "Read",+ "docs/wake-cli notes.md",+ Some(r#"{"file_path": "docs/wake-cli notes.md"}"#)+ ));+ assert!(+ !lookup(+ "Bash",+ "man wake-cli-old",+ Some(r#"{"command": "man wake-cli-old", "description": "wake-cli docs"}"#)+ ),+ "command 里没有整词就不算,哪怕 description 提到"+ );}}diff --git a/crates/wake-core/src/db.rs b/crates/wake-core/src/db.rsindex ceabd2a..9633867 100644--- a/crates/wake-core/src/db.rs+++ b/crates/wake-core/src/db.rs@@ -130,6 +130,11 @@ CREATE VIRTUAL TABLE IF NOT EXISTS titles_fts USING fts5();"#;+/// FTS 单元的派生规则版本(`adapters::units_from_messages` 及其上游解析)。改了派生+/// 规则就换个值:旧库首开时挂 fts_reindex 旗子,下一轮扫描强制重解析全部文件。+/// "1" = 2026-09-14 前(工具段不过滤 Wake 自指),"2" = 过滤自指回声+pub const FTS_FORMAT: &str = "2";+fn open_conn(path: &Path) -> Result<Connection> {if let Some(dir) = path.parent() {std::fs::create_dir_all(dir)?;@@ -168,6 +173,28 @@ fn open_conn(path: &Path) -> Result<Connection> {"CREATE INDEX IF NOT EXISTS idx_sessions_parent ON sessions(parent_key)",[],)?;+ // FTS 派生规则换代:库里记的版本与 FTS_FORMAT 不一致且已有会话 → 挂 fts_reindex+ // 旗子,下一轮扫描把全部文件重解析一遍(增量按 mtime/size 跳过的也重来),否则+ // 旧行会按旧规则一直留着,直到用户手动全量刷新(Codex review 2026-09-14)+ let stored_format: Option<String> = conn+ .query_row(+ "SELECT value FROM schema_meta WHERE key = 'fts_format'",+ [],+ |r| r.get(0),+ )+ .optional()?;+ if stored_format.as_deref() != Some(FTS_FORMAT) {+ if sessions_existed {+ conn.execute(+ "INSERT OR REPLACE INTO schema_meta(key, value) VALUES ('fts_reindex', '1')",+ [],+ )?;+ }+ conn.execute(+ "INSERT OR REPLACE INTO schema_meta(key, value) VALUES ('fts_format', ?1)",+ params![FTS_FORMAT],+ )?;+ }// host 迁移(2026-09-01 远程会话加列;空串 = 本地)。老库首扫时既有行// 全部落 '',与远程装饰器生产的非空 host 天然分域,无需回填if !table_has_column(&conn, NEWEST_COLUMN.0, NEWEST_COLUMN.1)? {@@ -380,13 +407,12 @@ impl Store {Ok(())}- /// 旧索引第一次升级到父子会话 schema 后,现有 Grok 行需要强制重解析,- /// 才能把临时 worktree cwd 统一回主会话项目。- pub fn needs_grok_parent_backfill(&self) -> bool {+ /// schema_meta 里的一次性旗子(升级后要补做的事),做完由 scanner 清掉+ fn has_meta_flag(&self, key: &str) -> bool {let conn = self.read.lock().unwrap();conn.query_row(- "SELECT 1 FROM schema_meta WHERE key = 'grok_parent_backfill'",- [],+ "SELECT 1 FROM schema_meta WHERE key = ?1",+ params![key],|_| Ok(()),).optional()@@ -394,15 +420,32 @@ impl Store {.unwrap_or(false)}- pub fn finish_grok_parent_backfill(&self) -> Result<()> {+ fn clear_meta_flag(&self, key: &str) -> Result<()> {let conn = self.write.lock().unwrap();- conn.execute(- "DELETE FROM schema_meta WHERE key = 'grok_parent_backfill'",- [],- )?;+ conn.execute("DELETE FROM schema_meta WHERE key = ?1", params![key])?;Ok(())}+ /// 旧索引第一次升级到父子会话 schema 后,现有 Grok 行需要强制重解析,+ /// 才能把临时 worktree cwd 统一回主会话项目。+ pub fn needs_grok_parent_backfill(&self) -> bool {+ self.has_meta_flag("grok_parent_backfill")+ }++ pub fn finish_grok_parent_backfill(&self) -> Result<()> {+ self.clear_meta_flag("grok_parent_backfill")+ }++ /// FTS 派生规则换代后(见 `FTS_FORMAT`)全部文件要重解析一遍;由 scanner 在+ /// 一轮没有解析失败的扫描后清掉,失败过就留着下次再来+ pub fn needs_fts_reindex(&self) -> bool {+ self.has_meta_flag("fts_reindex")+ }++ pub fn finish_fts_reindex(&self) -> Result<()> {+ self.clear_meta_flag("fts_reindex")+ }+/// 当前胜出副本的 `(key, file_path)`,scanner 用 file_path 把同一 agent/// 的多 location 会话交回真正拥有它的 adapter 快照。pub fn session_sources_for_agent(&self, agent: AgentId) -> Result<Vec<(String, String)>> {diff --git a/crates/wake-core/src/mcp/tools.rs b/crates/wake-core/src/mcp/tools.rsindex f9dbb2f..3138506 100644--- a/crates/wake-core/src/mcp/tools.rs+++ b/crates/wake-core/src/mcp/tools.rs@@ -736,15 +736,37 @@ fn subagent_label(sc: &SidechainInfo) -> String {}}-fn subagent_lines(sidechains: &[SidechainInfo]) -> String {+fn subagent_lines(sidechains: &[SidechainInfo], cap: Option<usize>) -> String {+ let shown = cap.unwrap_or(sidechains.len());let mut out = String::new();- for sc in sidechains.iter().take(MAX_SUBAGENTS_LISTED) {+ for sc in sidechains.iter().take(shown) {out.push_str(&format!("- {}\n", subagent_label(sc)));}- if sidechains.len() > MAX_SUBAGENTS_LISTED {+ if sidechains.len() > shown {out.push_str(&format!(- "- … and {} more\n",- sidechains.len() - MAX_SUBAGENTS_LISTED+ "- … and {} more — pass subagent=\"*\" for the full list\n",+ sidechains.len() - shown+ ));+ }+ out+}++/// `subagent="*"`:只列清单、不读转录、不设上限——主线页脚的清单封顶 30 条,Task 开+/// 得多的会话得有地方拿到其余的 id(Codex review 2026-09-14)+fn subagent_listing(title: &str, meta: &SessionMeta, sidechains: &[SidechainInfo]) -> String {+ let mut out = format!(+ "# {title}\nkey: `{}` · agent: {}\n\n",+ meta.key,+ meta.agent.display_name()+ );+ if sidechains.is_empty() {+ out.push_str("This session has no subagent transcripts.\n");+ } else {+ out.push_str(&format!(+ "{} subagent transcript{} (pass an id as `subagent` to read one):\n{}",+ sidechains.len(),+ plural(sidechains.len() as i64),+ subagent_lines(sidechains, None)));}out@@ -782,26 +804,24 @@ fn get_session(ctx: &ToolContext, args: &Value) -> ToolResult {))})?;let live = &transcript.meta;+ let title = if live.title.is_empty() {+ UNTITLED+ } else {+ &live.title+ };// 子代理转录按 id 现场解析,不进 TranscriptCache:子代理还在跑时它的文件独立于- // 主文件增长,拿主文件的戳当键会一直吐旧内容;文件通常远小于主线,一页一解析+ // 主文件增长,拿主文件的戳当键会一直吐旧内容;文件通常远小于主线,一页一解析。+ // 先读文件、再查缓存里的清单:清单来自缓存的主转录,主文件没变时看不见刚出现的+ // 子代理(Codex review 2026-09-14),读得到就算存在,边车信息缺就只报 idlet sidechain = match subagent {None => None,+ Some("*") => return Ok(subagent_listing(title, &meta, &transcript.sidechains)),Some(id) => {- let info = transcript- .sidechains- .iter()- .find(|sc| sc.id == id)- .ok_or_else(|| {- ToolError::Failed(if transcript.sidechains.is_empty() {- format!("`{}` has no subagent transcripts.", meta.key)- } else {- format!(- "`{}` has no subagent transcript `{id}`. It has:\n{}",- meta.key,- subagent_lines(&transcript.sidechains)- )- })- })?;+ if id.contains(std::path::is_separator) || id == "." || id == ".." {+ return Err(ToolError::InvalidParams(format!(+ "`subagent` must be a bare id as listed by the main transcript, not a path: `{id}`"+ )));+ }let messages = adapter.load_sidechain(&SessionFileRef::from_meta(&meta), id).map_err(|e| {@@ -811,11 +831,27 @@ fn get_session(ctx: &ToolContext, args: &Value) -> ToolResult {))})?;if messages.is_empty() {- return Err(ToolError::Failed(format!(- "Subagent transcript `{id}` of `{}` is empty or missing on disk.",- meta.key- )));+ return Err(ToolError::Failed(if transcript.sidechains.is_empty() {+ format!("`{}` has no subagent transcripts.", meta.key)+ } else {+ format!(+ "`{}` has no subagent transcript `{id}`. It has:\n{}",+ meta.key,+ subagent_lines(&transcript.sidechains, None)+ )+ }));}+ let info = transcript+ .sidechains+ .iter()+ .find(|sc| sc.id == id)+ .cloned()+ .unwrap_or_else(|| SidechainInfo {+ id: id.to_string(),+ agent_type: None,+ description: None,+ tool_use_id: None,+ });Some((info, messages))}};@@ -832,11 +868,6 @@ fn get_session(ctx: &ToolContext, args: &Value) -> ToolResult {let page = render_compact(messages, &opts);let mut out = String::new();- let title = if live.title.is_empty() {- UNTITLED- } else {- &live.title- };out.push_str(&format!("# {title}\n"));let mut facts = vec![format!("key: `{}`", meta.key),@@ -922,7 +953,7 @@ fn get_session(ctx: &ToolContext, args: &Value) -> ToolResult {"{} subagent transcript{} (pass an id as `subagent` to read one):\n{}",transcript.sidechains.len(),plural(transcript.sidechains.len() as i64),- subagent_lines(&transcript.sidechains)+ subagent_lines(&transcript.sidechains, Some(MAX_SUBAGENTS_LISTED))));}let with_sub = sub_iddiff --git a/crates/wake-core/src/scanner.rs b/crates/wake-core/src/scanner.rsindex ba67a06..f739375 100644--- a/crates/wake-core/src/scanner.rs+++ b/crates/wake-core/src/scanner.rs@@ -173,6 +173,10 @@ fn run_scan_inner(adapter.begin_scan();}let force_grok_backfill = store.needs_grok_parent_backfill();+ // FTS 派生规则换代(db::FTS_FORMAT):这一轮把 mtime/size 没变的也全部重解析。+ // 跑完就清旗子,不按"全部成功"重试——解析失败的文件下次也不会自己好,它变了+ // 自然走增量重解析;留着旗子只会让每次启动都全量一遍+ let force_reindex = store.needs_fts_reindex();let known = store.known_files()?;let mut seen_paths: std::collections::HashSet<String> = std::collections::HashSet::new();struct WorkItem<'a> {@@ -273,7 +277,8 @@ fn run_scan_inner(}for (ix, (adapter, refs)) in adapters.iter().zip(per_adapter).enumerate() {- let force_adapter = force_grok_backfill && adapter.agent() == AgentId::Grok;+ let force_adapter =+ force_reindex || (force_grok_backfill && adapter.agent() == AgentId::Grok);for r in &refs {seen_paths.insert(r.file_path.clone());}@@ -431,6 +436,9 @@ fn run_scan_inner(if force_grok_backfill && grok_backfill_succeeded {store.finish_grok_parent_backfill()?;}+ if force_reindex {+ store.finish_fts_reindex()?;+ }Ok(())}diff --git a/crates/wake-core/tests/mcp_stdio.rs b/crates/wake-core/tests/mcp_stdio.rsindex 1abf888..1a0bbde 100644--- a/crates/wake-core/tests/mcp_stdio.rs+++ b/crates/wake-core/tests/mcp_stdio.rs@@ -346,6 +346,24 @@ fn stdio_contract_end_to_end() {);assert!(is_err);assert!(bad.contains("- agent-fixture01"), "{bad}");+ // `*` 只列清单不读转录(主线页脚封顶 30 条,这里不封顶)+ let (all, is_err) = c.call(+ "wake_get_session",+ json!({ "key": CLAUDE_KEY, "subagent": "*" }),+ );+ assert!(!is_err, "{all}");+ assert!(+ all.contains("- agent-fixture01 — Explore: find the QR scanner code"),+ "{all}"+ );+ assert!(!all.contains("### [seq"), "listing only:\n{all}");+ // id 是路径形态:参数形状错,协议级 -32602,不去碰文件系统+ let reply = c.request(+ "tools/call",+ json!({ "name": "wake_get_session",+ "arguments": { "key": CLAUDE_KEY, "subagent": "../../etc/passwd" } }),+ );+ assert_eq!(reply["error"]["code"], -32602, "{reply}");// 5. 项目匹配:cwd 在项目子目录里、没匹配上、项目清单let (listed, is_err) = c.call(diff --git a/crates/wake-core/tests/scanner_finale.rs b/crates/wake-core/tests/scanner_finale.rsindex d65a5af..ddc3493 100644--- a/crates/wake-core/tests/scanner_finale.rs+++ b/crates/wake-core/tests/scanner_finale.rs@@ -306,6 +306,55 @@ fn migration_backfill_reparses_unchanged_grok_rows_once() {assert!(!store.needs_grok_parent_backfill());}+/// FTS 派生规则换代(db::FTS_FORMAT):旧库首开挂 fts_reindex 旗子,下一轮增量扫描+/// 把 mtime/size 都没变的行也重处理一遍,然后清旗子;新库不挂+#[test]+fn fts_reindex_flag_reprocesses_unchanged_rows_once() {+ let dir = tempfile::tempdir().unwrap();+ let db_path = dir.path().join("reindex.db");+ {+ let store = Store::open(&db_path).unwrap();+ assert!(!store.needs_fts_reindex(), "新库不该挂旗子");+ }+ // 模拟升级前的库:有 sessions 表,但没记过 fts_format+ rusqlite::Connection::open(&db_path)+ .unwrap()+ .execute("DELETE FROM schema_meta WHERE key = 'fts_format'", [])+ .unwrap();+ let store = Arc::new(Store::open(&db_path).unwrap());+ assert!(store.needs_fts_reindex(), "旧库首开要挂旗子");++ let path = "/tmp/reindex/p/s.jsonl";+ let mut before = seed(AgentId::ClaudeCode, "/tmp/reindex", path, "s", 42);+ before.meta.title = "before".into();+ // 库里已有同 mtime/size 的行,增量扫描本会跳过+ store.write_meta_only(&[(before.meta.clone(), 42)]).unwrap();+ let mut after = seed(AgentId::ClaudeCode, "/tmp/reindex", path, "s", 42);+ after.meta.title = "after".into();+ run_scan(+ &[Box::new(after) as Box<dyn AgentAdapter>],+ &store,+ &Recorder::new(),+ false,+ )+ .unwrap();+ let title = |store: &Store| store.get_session("claude-code:s").unwrap().unwrap().title;+ assert_eq!(title(&store), "after", "旗子在时未变的文件也要重处理");+ assert!(!store.needs_fts_reindex(), "跑完一轮就清");++ // 没旗子、文件没变:增量扫描照常跳过+ let mut third = seed(AgentId::ClaudeCode, "/tmp/reindex", path, "s", 42);+ third.meta.title = "third".into();+ run_scan(+ &[Box::new(third) as Box<dyn AgentAdapter>],+ &store,+ &Recorder::new(),+ false,+ )+ .unwrap();+ assert_eq!(title(&store), "after");+}+#[test]fn migration_backfill_retries_after_parse_failure() {let dir = tempfile::tempdir().unwrap();diff --git a/docs/cli.md b/docs/cli.mdindex 5386552..2822527 100644--- a/docs/cli.md+++ b/docs/cli.md@@ -82,7 +82,7 @@ One session's transcript, parsed live from the agent's own files, as compact Mar| `--message-chars` | N | truncate each message, default 4000, range 100–50000 || `--tools` | — | include tool inputs and outputs (verbose) || `--thinking` | — | include the assistant's thinking where the agent recorded it |-| `--subagent` | ID | read this subagent transcript instead of the main one; the main transcript lists the ids at its end |+| `--subagent` | ID | read this subagent transcript instead of the main one; the main transcript lists the ids at its end (at most 30), and `'*'` lists them all |`show` also accepts a bare native id (the one the agent's own `--resume` wants) and falls back to looking it up. When the same id exists on more than one host it lists the candidates instead of guessing.@@ -93,6 +93,7 @@ wake-cli show 'claude-code:1b2c3d4e-…'wake-cli show 'wake://session/claude-code:1b2c3d4e-…#42' --toolswake-cli show 'codex:0195c2a1-…' --from 120 --messages 40wake-cli show 'claude-code:1b2c3d4e-…' --subagent agent-a1b2c3d4+wake-cli show 'claude-code:1b2c3d4e-…' --subagent '*'```### `projects`diff --git a/docs/mcp.md b/docs/mcp.mdindex 386a51e..35baefc 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -177,7 +177,7 @@ One transcript as compact Markdown, parsed live from the agent's files.| `max_message_chars` | integer 100–50000 | 4000 | budget per message, shared by its text, thinking and tool calls; longer content is truncated and marked || `include_tools` | boolean | false | include tool inputs and outputs (verbose) || `include_thinking` | boolean | false | include the assistant's recorded thinking |-| `subagent` | string | | read this subagent transcript instead of the main one; the main transcript lists the ids at its end |+| `subagent` | string | | read this subagent transcript instead of the main one; the main transcript lists the ids at its end (at most 30), and `*` lists them all |The reply starts with a header (title, key, agent, host, project and branch, model, time range, message count), then one block per message:@@ -191,7 +191,7 @@ inotify queues overflow when …- 🔧 Grep: need_rescan```-Tool calls are folded to one line each (name plus input preview) unless `include_tools` is set; at most 40 tool calls are listed per message, the rest are counted. Injected context (system reminders, IDE context) is skipped and counted. Compaction summaries are kept as quotes. Images are noted, not included. Subagent transcripts (Claude Code sidechains, Cursor subagents) are listed at the end of the main transcript with their ids; pass one as `subagent` to read it, with the same paging options.+Tool calls are folded to one line each (name plus input preview) unless `include_tools` is set; at most 40 tool calls are listed per message, the rest are counted. Injected context (system reminders, IDE context) is skipped and counted. Compaction summaries are kept as quotes. Images are noted, not included. Subagent transcripts (Claude Code sidechains, Cursor subagents) are listed at the end of the main transcript with their ids; pass one as `subagent` to read it, with the same paging options. The footer lists at most 30; `subagent: "*"` returns the full list without a transcript.The footer says which seqs were shown and either `End of transcript.` or a `from_seq=<n>` hint for the next page. Seq numbers are the same ones Wake's own search results and transcript view use.diff --git a/skills/wake/SKILL.md b/skills/wake/SKILL.mdindex 7f3a3e1..ee5a23d 100644--- a/skills/wake/SKILL.md+++ b/skills/wake/SKILL.md@@ -63,7 +63,7 @@ wake-cli show 'claude-code:1b2c3d4e-…'Add `--tools` for tool inputs and outputs, `--thinking` for recorded reasoning. Both areverbose — start without them. Work done by subagents (Claude Code sidechains, Cursorsubagents) is not in the main transcript; its ids are listed at the end of the output —-read one with `--subagent ID`.+read one with `--subagent ID`, or `--subagent '*'` to list them all.**Which projects have history**