Agent ingress HTML-escapes message bodies and silently truncates long bodies
维护者通常 1 天内回复
@rekram1-node 已经在做这个了。
开始于 2026年10月4日。
评估
这个 Issue 还没有评估数据。
描述
Description
Message bodies arriving at opencode agents via the Slack bridge are corrupted in two silent ways. Nothing errors; the text is just wrong when it lands in agent context, beads, PRs, and shell commands.
Defect 1 — HTML entity escaping (silent, length-preserving)
Message bodies are HTML-escaped on ingress: < → <, > → >, & → &.
Evidence (2026-09-30):
- An agent sent a raw
<main>inside a plain-text sentence; the receiving agent quoted it back still escaped — confirms escaping affects Slack messages themselves, not just downstream tooling. - Inbound scope blocks reached agents with
<main>and&already escaped. - Ruled out: voltron slack-post delivery path, model output — this is a normalising transform on ingress in the harness/context-assembly layer.
Impact: any agent copying an HTML tag, shell metacharacter (>, |, &), or comparison operator out of a bridge message pastes corrupted text into code, beads, PRs, or shell commands. Silent wrong-state.
Defect 2 — long-body truncation (lossy)
Long message bodies are cut off, usually mid-block. Observed three times in one session:
- A task group (4 items) arrived entirely absent — heading survived, content did not.
- Groups C, D, E of a 138-line source file arrived absent (lines 85–138).
- A closing rationale cut mid-sentence.
System details
- OpenCode version: 1.18.34
- Operating system: macOS 27.0
- Slack bridge/client setup: custom fleet bridge (
voltron/scripts/slack-post) delivering agent messages into opencode agent sessions; corruption observed on ingress into the agent context layer, after bridge delivery (bridge itself verified clean — entity forms present in agent-received bodies, not in bridge output)
Steps to reproduce
- Send any message containing
<,>, or&through the Slack bridge to an opencode agent; observe the entity form in the agent's received body. - Send a body above some length threshold; observe truncation mid-block.
Expected behavior
Message bodies arrive byte-identical: raw <, >, & preserved; long multi-block bodies complete.
Ask
- Locate the ingress/context-assembly path where entities are escaped and where bodies are truncated.
- Preserve raw text on ingress (or provide an explicit escape contract agents can rely on).
- Fix or remove the truncation limit — silent mid-block loss destroys task scope.
- Regression test: body with
<,>,&, and a >2k multi-block message arrives byte-identical.
Cross-reference
- Linear: MG-1550 (metrograph-ai)
- Folded bead: MG-1552 (closed, scope merged into MG-1550)
- Original investigation ruled out: voltron delivery path, model output
- 主要语言
- TypeScript
- 星标
- 224k
- 派生
- 30k
- 平均合并
- 6 小时 48 分钟
- 30 天内合并 PR
- 490
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
anomalyco/opencode#61221 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#60584 · 2 条评论 ·
维护者通常 1 天内回复
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)可能已有人在做 @tneemo 于 3 天前认领。 未关闭reproduced
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#60558 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#60541 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
anomalyco/opencode#60529 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 66/100
microsoft/playwright#43875 · 1 条评论 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1 小时以内 新手友好度 88/100
adobe/react-spectrum#10909 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
Run the dependency drift check可能已有人在做 @spaceninja 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
cloudfour/lighthouse-parade#449 ·
维护者通常 1 天内回复