跳到主要内容Skip to main content

日志里留下了什么What the Logs Keep

What the Logs Keep

  • 硬件与部署Hardware & deployment
  • 第二站 · 上手Station 2 · Hands On
  • 引用核验 2026-11-06refs checked 2026-11-06
解决什么问题What problem it solves

你的提示词、文件内容、工具参数会被谁存下来、存多久、谁能看到。Who stores your prompts, file contents and tool arguments, for how long, and who can look at them.

这是什么What it is

会话记录通常比你以为的完整。Claude Code 的数据说明页写得具体:反馈上传会把对话记录、子代理记录、磁盘上的原始会话日志一起传走;已知格式的 API key 与令牌在上传前脱敏,源代码与文件内容按原样上传;共享出去的记录最长保留 6 个月。

企业侧的日志是给合规用的。微软那份 Copilot 数据保护文档列出可捕获的内容:提示词、响应与被引用内容的审计记录,供 eDiscovery 与合规调查使用的交互数据,用户上传的文件,以及 Copilot Pages 所在的容器。保留与删除按配置好的 Purview 保留策略走。

「不用于训练」不等于「没人看」。Anthropic 的隐私政策写的是:用于训练时会把输入输出与你的用户 ID 解关联,删除在 30 天内完成。这条描述的是训练与删除,没有替你排除安全扫描与合规处理。

保留期、能不能关、谁能查阅,各家按套餐与区域差别很大。你这份条款没写的,就是未知,别拿别家的数字套。

Session records are usually more complete than people assume. Claude Code's data-usage page spells it out: opting to send feedback uploads the conversation transcript, any subagent transcripts and the raw session log from disk; known API-key and token patterns are redacted first, while source code and file contents go as-is, and a shared transcript is retained for up to six months.

On the enterprise side the records exist for compliance. Microsoft's Copilot data-protection document lists what can be captured: audit records for prompts, responses and referenced content; interaction data for eDiscovery and investigations; user-uploaded files; and content created in Copilot Pages. Retention and deletion follow the configured Purview policy.

Not used for training is not the same as nobody reads it. Anthropic's privacy policy says inputs and outputs used for training are disassociated from your user ID and that deletion happens within 30 days — statements about training and deletion, which do not by themselves rule out abuse scanning or compliance handling.

Retention windows, whether logging can be switched off and who has access vary by vendor, plan and region. Whatever your own terms of service do not state is unknown; do not fill the gap with another company's number.

为什么需要知道Why it matters

日志决定了哪些内容不能进这条链路:客户名单、密钥、还没发布的代码。看懂日志边界以后,你才知道哪些字段要在送出去之前自己删掉。The logs decide what must never enter this pipeline: customer lists, keys, unreleased code. Once you see the logging boundary you know which fields to strip yourself before anything is sent.

出处Sources
  • Claude Code 数据使用说明Claude Code: data usage ↗
  • Microsoft Copilot 数据保护与审计架构Microsoft Copilot data protection architecture ↗
  • Anthropic 隐私政策Anthropic privacy policy ↗
  • LangSmith 可观测性文档LangSmith Observability ↗