Repository navigation
Description
What happened
On a clean rust-preview checkout, the registered Bot's first model request omits both SendUser and sleep from its tool list. The same request's system prompt instructs the Bot to use both. With this request, the model has no advertised way to publish a reply to Chat or explicitly end the Turn with sleep.
Expected: both tools are offered to the registered Bot when it runs with direct tools. They should remain unavailable to ordinary Sessions.
How to reproduce
- Start the native Agent Host with a fresh Root and an empty workspace. Enable the Bot and scheduled tasks.
- Configure a local OpenAI Chat Completions compatible endpoint that records incoming requests and returns a short streamed text response. Disable Code Mode and tool discovery for the probe.
- Open the registered Bot (
openBot), select that connection and send it an ordinary message such as “Reply with hello.” - Inspect the first
POST /v1/chat/completions. The Bot instructions name both tools, and the request advertisesScheduledTask, but neitherSendUsernorsleepappears intools[].function.name.
Environment
rust-previewat0f4ae907bb626a4d1a7f7d732de78f21f6f9485b- macOS 26.7.2 arm64, Rust 1.98.0
- Native Agent Host test fixture, loopback mock provider, no API key or existing user state
- The probe was added only to the test fixture; no production code or discovery PR commits were applied
Logs, screenshots, or additional context
Bot instructions name both controls; wire tools (1): ScheduledTask
wire SendUser present: false; wire sleep present: false
test result: ok. 1 passed; 0 failed
The initial catalog selection exempts the two tools from the ordinary allowlist for the registered Bot. But Bot admission freezes a coordination tool list without either name. Live configuration intersects the Session and Run lists, and step binding filters the catalog against that intersection without preserving the Bot identity exception.
This may help explain symptoms like #6711. That report shows a Turn with no tool calls; this probe confirms a case where the two tools were absent from the request itself. The discovery tests in #6728 first surfaced the issue here; the reproduction above does not require that PR.
AI assistance: OpenAI Codex assisted with the local reproduction and drafting.
简体中文
发生了什么
在干净的 rust-preview 上,已注册 Bot 的首个模型请求没有提供 SendUser 和 sleep,但同一请求的系统提示词要求使用这两个工具。因此模型无法通过请求提供的工具把回复发到聊天,也无法显式调用 sleep 结束本轮。
预期:已注册 Bot 在直接工具模式下可以使用这两个工具;普通 Session 仍然不能使用。
复现步骤
- 用全新的 Root 和空工作区启动原生 Agent Host,开启 Bot 和定时任务。
- 配置本地 OpenAI Chat Completions 兼容模拟端点,记录请求并返回一段简短的流式文本。复现时关闭 Code Mode 和工具搜索。
- 用
openBot打开已注册 Bot,选择该模型连接,发送一条普通消息,例如“回复你好”。 - 查看第一个
POST /v1/chat/completions。Bot 提示词提到了两个工具,请求中也有ScheduledTask,但tools[].function.name中没有SendUser或sleep。
环境与定位
rust-preview:0f4ae907bb626a4d1a7f7d732de78f21f6f9485b;macOS 26.7.2 arm64,Rust 1.98.0。- 使用原生 Agent Host 测试夹具和本地回环模拟模型,无需 API 密钥或已有用户数据。仅添加临时测试探针,未改生产代码,也未叠加主动发现 PR。
- 初始工具目录会按 Bot 身份保留这两个工具。接收任务时固化的协调工具名单不包含它们;后续模型步骤按 Session 和 Run 的工具名单交集过滤,未保留此前的 Bot 身份例外。
- Bot: a Turn that answers in plain text without SendUser or sleep leaves the answer out of Chat #6711 记录的是没有调用工具的表现;这次抓到了请求本身缺少两个工具的情况。最初在 feat(assistant): retain bounded discovery records and feedback #6728 的测试中注意到该现象,独立复现无需该 PR。
AI 协助:OpenAI Codex 协助完成本地复现和报告起草。
Activity
fix(agent): restore SendUser and sleep for the Bot (#6773)