﻿---
title: "使用 W&B Weave 追踪 Codex 会话"
filename: "terminal"
canonical: /templates/weave-codex-wandb-plugin/
---

# 使用 W&B Weave 追踪 Codex 会话

使用 weave-codex install 配置 Stop 钩子，WEAVE_PROJECT 指定 entity/project。默认采集提示词和命令输出，无头任务使用 weave-codex run。

```
npm install -g weave-codex
wandb login
export WEAVE_PROJECT="YOUR-TEAM/YOUR-PROJECT"
weave-codex install
weave-codex status

# 会话里：/hooks 审过 weave-codex 再信任

# 无头：
# weave-codex run -- codex exec "fix the failing test"
# weave-codex collect --all

# 只要结构、不要正文：
# export WEAVE_CODEX_CAPTURE_CONTENT=0

# 卸装：
# weave-codex uninstall

# 不要：
# codex plugin marketplace add wandb/weave-codex
# bypass_hook_trust = true
# mcp login
# weave.init()
# --ephemeral

```
