[串话] 未持久化的用户消息进入模型上下文:本地全部存储零记录,但模型已处理并回复
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
### 问题描述 / What happened
2026-09-14 17:54:12–17:54:47(UTC+8)期间,一段 Teable API 测试请求文本进入了 bot「cindy-default」对话的模型上下文,模型据此生成了回复(要求提供 token 和 Teable 地址)。但这段文本在本机的所有持久化层中均无记录:
pi 引擎会话文件:无该用户消息条目
宿主聊天数据库 messages 表:无该行
输入队列快照 agent_input_queue_snapshots:空表
宿主主日志 / agent 日志:无消息级路由记录
本机其余 4 个实例数据库 + 旧实例数据目录:全库 teable 关键字零命中(仅命中事后排查内容)
结果:用户在界面上能看到 bot 关于 Teable 的回复(已正常落盘),却看不到自己"发过"的消息(从未落盘),表现为凭空出现的助手回复,用户确认从未发送过该消息。
时间线(均为 UTC+8;括号内为 UTC)
时刻 | 事件 | 落盘位置
-- | -- | --
17:38:01 | 应用自动更新完成重启,DESKTOP-L5IIEK8 于 17:38:16 打开 device-link 控制链路 | main-2026-09-14.log
17:54:12.695 | 用户发出「邀请」,宿主以 [UI_ACTION_TRIGGER] 合成消息启动引擎会话 | ✅ jsonl + messages 表
17:54:30.584 | bot 第一条回复(打招呼)生成,其 thinking 已在处理 Teable 请求 | ✅ jsonl(含 thinking 原文)
17:54:47.231 | bot 第二段回复:要求提供 token 和 Teable 地址 | ✅ jsonl + messages 表
17:55:22 | 用户问「我和你说过什么话了?」 | ✅ 落盘
17:55:40 | 用户邀请另一个 teammate(bot_1789379738081_v6kfni,同命名空间) | ✅ 落盘
17:58:38 | 另一命名空间(d249cc…)的 cindy-default 被邀请(独立会话,无 Teable 内容) | ✅ 落盘
矛盾点:17:54:30 的 thinking 已引用 Teable 任务,但该请求文本在 17:54:12–17:54:30 之间进入模型上下文,且在所有本地存储中均无对应用户消息记录。
注入的原文(模型 thinking 中可还原)
你可以访问 teable 的 api 吗?我给你一个 personal access token 你帮我测试一下访问是否正常,如果可以访问的话,请帮我把每个 base 的 table 都列出来
关键 ID
宿主会话 ID:22c37ea6-781a-4f2b-9e6a-1a0a21c9b794(sessions 表主键,title='Cindy')
引擎会话 ID:01a09f56-a9c5-71df-82da-832f0ae25a34(sessions.sdk_session_id 指向的 pi jsonl)
引擎会话文件:C:\Users\XINDONG\AppData\Roaming\CindyGlobal\pi-agent-home\sessions\2026-09-14T09-54-12-037Z_01a09f56-a9c5-71df-82da-832f0ae25a34.jsonl
宿主数据库:C:\Users\XINDONG\AppData\Roaming\CindyGlobal\cindy-cmtjshv8e0ah3zb01anxnund1.db
### 环境 / Environment
应用:Cindy 桌面版 0.1.81(hotfix,cindy-0.1.81-hotfix.zip,当天 17:37 刚完成自动更新)
OS:Windows(主机名 XD-4859),时区 UTC+8
bot:cindy-default(owner 命名空间 90c63804083afd8e58df)
模型:z-ai/glm-5.3-flash,provider cindy(openai-completions 传输),outbound upstream https://api.laxarouter.ai
device-link:wss://device-link.cindy.app,账号下链接设备含 XD-4859(本机)、DESKTOP-L5IIEK8(另一台电脑)、多台 iPhone / Mi 10
本机存在多个 Cindy 实例:Roaming/CindyGlobal(含多个 owner 命名空间:90c638…、d249cc… 等)、Roaming/Cindy(旧实例目录)、.dev-instances
### 复现步骤 / Steps to reproduce
有个appstore号第一次打开伙伴遇到的,直接跳出一段无关的回答,初始打招呼的话都没出来。 其他号没有遇到
### 日志与截图 / Logs & screenshots
Contributor guide
Research direction
Start by tracing the [UI_ACTION_TRIGGER] path from the device-link control chain into the pi engine, then compare persistence in the session JSONL, messages table, agent_input_queue_snapshots, and host or agent logs. Done means the cause of the unpersisted input is identified and user messages cannot reach model processing without an auditable persisted record.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100