chat(devapp): run 事件 WebSocket 建立前即关闭(回落轮询才拿到结果)+ 前端反复告警 Agent copilotkit-v2-<id> not found
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## 现象(2026-09-08 DevApp,chat 恢复后的第一条成功对话)
DevTools Console:
- `WebSocket connection to 'wss://devapp.boardx.us/agent-runs//events' failed: WebSocket is closed before the connection is established.`
- `Agent copilotkit-v2- not found` 连续 4 次(两个不同 agentId 各 4 次)。
对话本身成功(8 秒、技能活动 20 项),说明结果是靠轮询回落拿到的;实时事件流没有工作。
## 要查
1. 反向代理/网关对 `/agent-runs/*/events` 的 WebSocket 升级是否放行(devapp 的 nginx/caddy 配置),还是 API 侧在握手前关闭。
2. `Agent copilotkit-v2- not found` 来自 CopilotKit 运行时按 agentId 查找 agent 失败——与 `COPILOTKIT_V2_AGENT_ID 配置有误…已回退到 org 动态默认` 那条 API 日志(今天 04:30Z 见过)是否同一根因。
## 影响
对应 37 条路径计划 F2(断线重连)/ 流式反馈(DA-19g):实时性与重连语义在 DevApp 上可能只在轮询路径上成立。不阻塞人类基础测试,但会让流式/重连类用例在 DevApp 上表现与 CI 不同。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by checking the DevApp nginx/caddy configuration for WebSocket upgrades on /agent-runs/*/events, then compare it with the API-side handshake behavior. Review the CopilotKit agent lookup and the COPILOTKIT_V2_AGENT_ID fallback log. Done means the WebSocket connects, streaming and reconnect behavior work in DevApp, and the repeated agent-not-found warnings are gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100