# Pitfall Log / 踩坑日志

项目：mksglu/context-mode

摘要：发现 23 个潜在踩坑项，其中 3 个为 high/blocking；最高优先级：安装坑 - 来源证据：Feature Request: Add CodeBuddy Code support。

## 1. 安装坑 · 来源证据：Feature Request: Add CodeBuddy Code support

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Feature Request: Add CodeBuddy Code support
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_e09face1208e43d685be6c8ebf7015e9 | https://github.com/mksglu/context-mode/issues/651 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。

## 2. 安装坑 · 来源证据：ctx_batch_execute corrupts heredoc commands by appending stderr redirection

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：ctx_batch_execute corrupts heredoc commands by appending stderr redirection
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_6888a03e6d5b4d9492dff3e5efce4f48 | https://github.com/mksglu/context-mode/issues/656 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 3. 安装坑 · 来源证据：v1.0.146: plugin.json points to wrong skills path and stale MCP server path

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.0.146: plugin.json points to wrong skills path and stale MCP server path
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_e1ebfb0450e44c198d3ff017d55a51d0 | https://github.com/mksglu/context-mode/issues/658 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 4. 安装坑 · 来源证据：OpenCode plugin registers hooks only -- never registers ctx_* tools

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：OpenCode plugin registers hooks only -- never registers ctx_* tools
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_d1ee350cd2374bb785a0628089fee355 | https://github.com/mksglu/context-mode/issues/637 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。

## 5. 安装坑 · 来源证据：Pi bridge preserves claude-code identification env vars — spawned server misdetects as claude-code and writes to ~/.cla…

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Pi bridge preserves claude-code identification env vars — spawned server misdetects as claude-code and writes to ~/.claude/ instead of ~/.pi/
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_8f49345b591f4f51afc650b8732da4d3 | https://github.com/mksglu/context-mode/issues/561 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。

## 6. 安装坑 · 来源证据：Pi subagent fails: DatabaseLockedError - another context-mode server is already running

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Pi subagent fails: DatabaseLockedError - another context-mode server is already running
- 对用户的影响：可能阻塞安装或首次运行。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_e0a18821f52c4610a9109f8cb6920829 | https://github.com/mksglu/context-mode/issues/562 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。

## 7. 安装坑 · 来源证据：[BUG]: Hardcoded storage path for many platforms

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[BUG]: Hardcoded storage path for many platforms
- 对用户的影响：可能阻塞安装或首次运行。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_b64e0c04c70b4726a0e860dc6a0954c9 | https://github.com/mksglu/context-mode/issues/649 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。

## 8. 安装坑 · 来源证据：[BUG]: `ctx_search` source filter does not escape LIKE wildcards — unintended cross-source result leakage

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[BUG]: `ctx_search` source filter does not escape LIKE wildcards — unintended cross-source result leakage
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_89e33c17dcfa452c8ad33ba344a9c6bb | https://github.com/mksglu/context-mode/issues/646 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 9. 安装坑 · 来源证据：[Bug]: Plugin-only installation does not work with OpenCode

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]: Plugin-only installation does not work with OpenCode
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_50609b9a9e2b4d4682713f28fd4c5d6d | https://github.com/mksglu/context-mode/issues/652 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 10. 安装坑 · 来源证据：ctx-upgrade leaves old server process running (zombie instance on upgrade)

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：ctx-upgrade leaves old server process running (zombie instance on upgrade)
- 对用户的影响：可能影响升级、迁移或版本选择。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_92a91d8bb13e4cf594229b3280c4d2eb | https://github.com/mksglu/context-mode/issues/559 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 11. 安装坑 · 来源证据：sessionstart.mjs age-gated cleanup uses `statSync` (follows symlinks) — deletes fresh symlinks whose targets are stale;…

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：sessionstart.mjs age-gated cleanup uses `statSync` (follows symlinks) — deletes fresh symlinks whose targets are stale; 4-char `lstatSync` fix
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_ccef8bb7485f482f9bcb08b6cc2494b2 | https://github.com/mksglu/context-mode/issues/644 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 12. 配置坑 · 可能修改宿主 AI 配置

- 严重度：medium
- 证据强度：source_linked
- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。
- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。
- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。
- 防护动作: 涉及宿主配置目录时必须给回滚路径，不能只给安装命令。
- 证据：capability.host_targets | github_repo:1164477708 | https://github.com/mksglu/context-mode | host_targets=claude, claude_code

## 13. 配置坑 · 来源证据：No exclusive lock on SQLite database — multiple server instances cause unbounded WAL growth and query hangs

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：No exclusive lock on SQLite database — multiple server instances cause unbounded WAL growth and query hangs
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_a629676796f7486d9e185f643b260d07 | https://github.com/mksglu/context-mode/issues/560 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。

## 14. 配置坑 · 来源证据：Preview truncation slices UTF-16 surrogate pairs, producing orphan `\uD83D` in tool_result and breaking the host API re…

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Preview truncation slices UTF-16 surrogate pairs, producing orphan `\uD83D` in tool_result and breaking the host API request
- 对用户的影响：可能影响升级、迁移或版本选择。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_d52bae5266e442cea5a1fa5b42f86c1a | https://github.com/mksglu/context-mode/issues/659 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 15. 能力坑 · 能力判断依赖假设

- 严重度：medium
- 证据强度：source_linked
- 发现：README/documentation is current enough for a first validation pass.
- 对用户的影响：假设不成立时，用户拿不到承诺的能力。
- 建议检查：将假设转成下游验证清单。
- 防护动作: 假设必须转成验证项；没有验证结果前不能写成事实。
- 证据：capability.assumptions | github_repo:1164477708 | https://github.com/mksglu/context-mode | README/documentation is current enough for a first validation pass.

## 16. 运行坑 · 来源证据：[BUG]:Pi and OMP adapters write SessionDB to `context-mode.db` but MCP server reads from `<project-hash>.db` — `ctx_sta…

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：[BUG]:Pi and OMP adapters write SessionDB to `context-mode.db` but MCP server reads from `<project-hash>.db` — `ctx_stats` and timeline search degraded
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_cbceaf1c624d40049ac2151af7c1e83d | https://github.com/mksglu/context-mode/issues/645 | 来源类型 github_issue 暴露的待验证使用条件。

## 17. 维护坑 · 维护活跃度未知

- 严重度：medium
- 证据强度：source_linked
- 发现：未记录 last_activity_observed。
- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。
- 防护动作: 维护活跃度未知时，推荐强度不能标为高信任。
- 证据：evidence.maintainer_signals | github_repo:1164477708 | https://github.com/mksglu/context-mode | last_activity_observed missing

## 18. 安全/权限坑 · 下游验证发现风险项

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 对用户的影响：下游已经要求复核，不能在页面中弱化。
- 建议检查：进入安全/权限治理复核队列。
- 防护动作: 下游风险存在时必须保持 review/recommendation 降级。
- 证据：downstream_validation.risk_items | github_repo:1164477708 | https://github.com/mksglu/context-mode | no_demo; severity=medium

## 19. 安全/权限坑 · 存在评分风险

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 对用户的影响：风险会影响是否适合普通用户安装。
- 建议检查：把风险写入边界卡，并确认是否需要人工复核。
- 防护动作: 评分风险必须进入边界卡，不能只作为内部分数。
- 证据：risks.scoring_risks | github_repo:1164477708 | https://github.com/mksglu/context-mode | no_demo; severity=medium

## 20. 安全/权限坑 · 来源证据：PreToolUse hook fails on project paths containing spaces (macOS)

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：PreToolUse hook fails on project paths containing spaces (macOS)
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_0e6f8fa845c0493db18d97fc48cf1b82 | https://github.com/mksglu/context-mode/issues/636 | 来源讨论提到 node 相关条件，需在安装/试用前复核。

## 21. 安全/权限坑 · 来源证据：[BUG]: MCP bridge silently degrades on slow `initialize` — retry on timeout instead of failing permanently

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[BUG]: MCP bridge silently degrades on slow `initialize` — retry on timeout instead of failing permanently
- 对用户的影响：可能影响授权、密钥配置或安全边界。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作: 不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_c17fbb0a32674c7b9dad1eefe4a0c3d2 | https://github.com/mksglu/context-mode/issues/647 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。

## 22. 维护坑 · issue/PR 响应质量未知

- 严重度：low
- 证据强度：source_linked
- 发现：issue_or_pr_quality=unknown。
- 对用户的影响：用户无法判断遇到问题后是否有人维护。
- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。
- 防护动作: issue/PR 响应未知时，必须提示维护风险。
- 证据：evidence.maintainer_signals | github_repo:1164477708 | https://github.com/mksglu/context-mode | issue_or_pr_quality=unknown

## 23. 维护坑 · 发布节奏不明确

- 严重度：low
- 证据强度：source_linked
- 发现：release_recency=unknown。
- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。
- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。
- 防护动作: 发布节奏未知或过期时，安装说明必须标注可能漂移。
- 证据：evidence.maintainer_signals | github_repo:1164477708 | https://github.com/mksglu/context-mode | release_recency=unknown
