Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
396192e
Document Codex desktop capture research
fengjikui Jul 16, 2026
bf503a2
Document Codex subscription forwarding proof
fengjikui Jul 17, 2026
1c627bf
docs: record Codex multi-turn forwarding loop
fengjikui Jul 18, 2026
82a159e
Add explicit Codex trace capture
fengjikui Jul 18, 2026
98d608f
Adjust package budget for Codex runtime
fengjikui Jul 18, 2026
f7c20ac
Stabilize cross-platform release gates
fengjikui Jul 18, 2026
8ec1cf4
Fix Codex smoke paths on Windows
fengjikui Jul 18, 2026
eb3369d
Add Desktop-first Codex capture
fengjikui Jul 18, 2026
368df87
Add Agent-scoped translation providers
fengjikui Jul 18, 2026
6cc4947
Improve Codex trace evidence and subagent presentation
fengjikui Jul 18, 2026
5214bac
Clarify Codex lifecycle and tool semantics
fengjikui Jul 18, 2026
18edca4
Simplify multi-agent trace presentation
fengjikui Jul 18, 2026
aac76d0
Clarify reconstructed trace evidence
fengjikui Jul 18, 2026
dbb0cb9
Add provider-neutral turn mechanism flows
fengjikui Jul 18, 2026
a310918
Clarify multi-agent return evidence
fengjikui Jul 18, 2026
c9e1f19
Normalize Codex request semantics and raw view
fengjikui Jul 18, 2026
46772f3
Clarify organized section evidence
fengjikui Jul 18, 2026
59b50f0
Explain nested Harness tool dispatch
fengjikui Jul 18, 2026
b407cce
Explain Harness context compaction
fengjikui Jul 18, 2026
682e844
Clarify subagent branch summaries
fengjikui Jul 18, 2026
319b40b
Explain post-compaction history state
fengjikui Jul 18, 2026
d925fee
Clarify dynamic tool schema provenance
fengjikui Jul 18, 2026
bc3b487
Fix compact Codex subagent lineage
fengjikui Jul 19, 2026
6314b28
Omit unknown tool schema counts
fengjikui Jul 19, 2026
789dc00
Clarify trace event filters
fengjikui Jul 19, 2026
5916d4f
Make request number search exact
fengjikui Jul 19, 2026
7dbcdc6
Clarify observed rollout input delta
fengjikui Jul 19, 2026
449630c
Default Codex capture to exact proxy
fengjikui Jul 19, 2026
fba032e
Document Codex Desktop App Server bridge experiment
fengjikui Jul 19, 2026
63d50b4
feat: add selected-thread Codex Desktop exact capture
fengjikui Jul 19, 2026
9db3f90
test: align Codex Desktop release gates
fengjikui Jul 19, 2026
f75fa15
Deduplicate Harness injections from organized messages
fengjikui Jul 20, 2026
130c3ef
Clarify history message and response views
fengjikui Jul 20, 2026
1875dd1
Keep raw view toggles sticky
fengjikui Jul 20, 2026
e347389
Keep Codex Desktop restart smoke out of release gate
fengjikui Jul 20, 2026
3ca10d2
Fix Codex tool search message rendering
fengjikui Jul 21, 2026
9764ca6
Fix directional Codex tool exchange timeline
fengjikui Jul 21, 2026
91adf23
Fix complete tool search output details
fengjikui Jul 21, 2026
0dc462e
Fix post-compaction message history split
fengjikui Jul 21, 2026
a7f28c1
Classify slash prompts and developer context
fengjikui Jul 21, 2026
b9e0834
Fix Codex subagent lifecycle correlation
fengjikui Jul 22, 2026
4524281
test: recalibrate npm package budget
fengjikui Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to peekMyAgent are documented in this file. The project foll

## [Unreleased]

### Added

- `pma codex` now opens Codex Desktop for the current project, exposes a waiting Source immediately, and binds that stable Source to the next new workspace thread without copying rollout history into peekMyAgent SQLite.
- Codex XML-like Harness blocks now use a conservative tag registry for runtime, capability, policy, lifecycle, internal, and subagent presentation, with multilingual block translation through the shared cache pipeline.

### Changed

- Viewer source summaries, single-request details, and complete/compact/cursor timeline responses now use one versioned runtime DTO contract enforced at the Server and browser API boundaries.
Expand Down
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

peekMyAgent is a local-first dashboard for inspecting what coding agents send to model providers.

It helps you understand how tools such as Claude Code and OpenClaw assemble system prompts, user messages, tool definitions, tool results, history, model parameters, and raw request bodies before they reach the remote model.
It helps you understand how tools such as Claude Code, Codex, and OpenClaw assemble system prompts, user messages, tool definitions, tool results, history, model parameters, and raw request bodies before they reach the remote model.

peekMyAgent is not meant to "steal hidden prompts". It is an observability tool for your own local agent sessions, in environments where you explicitly choose to record and inspect the traffic.

Expand Down Expand Up @@ -36,7 +36,9 @@ See the [visual usage guide](docs/visual-usage-guide.zh-CN.md) for the annotated

- Open a local dashboard at `http://127.0.0.1:43110`.
- Start Claude Code through `pma claude ...` and capture its model requests.
- Use the native Codex Desktop UI with managed exact Responses capture on supported macOS builds, fall back explicitly to zero-copy rollout observation, or start Codex CLI behind the exact proxy.
- Start OpenClaw through `pma openclaw ...` and capture its model requests.
- Switch the sidebar's observed Agent so Codex, Claude Code, OpenClaw, and imported traces stay separate.
- Inspect requests as a timeline with user input, system summaries, tools, tool calls, tool results, responses, token usage, and raw JSON.
- Inspect Claude Code subagent traffic and group child-agent requests.
- Open the dashboard from inside Claude Code with `/peekmyagent`.
Expand All @@ -47,7 +49,7 @@ See the [visual usage guide](docs/visual-usage-guide.zh-CN.md) for the annotated

- macOS, Windows, or Linux.
- Node.js 24 or newer. peekMyAgent currently uses Node's built-in `node:sqlite` runtime for its local store.
- Claude Code and/or OpenClaw already installed and working.
- Claude Code, Codex, and/or OpenClaw already installed and working for the integration you want to use.
- Your model provider configuration should already work in the terminal where you run the Agent.

If `claude` does not work by itself, fix that first:
Expand Down Expand Up @@ -164,6 +166,57 @@ The dashboard runs locally by default:
http://127.0.0.1:43110
```

## Quick Start With Codex

From the project you want to inspect, start Codex behind a one-process exact proxy:

```bash
cd <your-project>
pma codex
```

Send messages in the Codex TUI in that terminal. The dashboard shows the verbatim request/response, tool schemas, calls, and results. PMA does not edit `~/.codex/config.toml` or depend on a persisted rollout.

Pass ordinary Codex arguments directly:

```bash
pma codex resume --last
pma codex exec "Inspect this repository"
pma codex --dangerously-bypass-approvals-and-sandbox
```

The last command bypasses approvals and sandboxing; use it only in a trusted isolated environment. In Codex CLI, `-c` means config override, not continue.

To keep the native Codex Desktop interaction surface and inspect the exact wire request on a supported macOS build, run this command from an **external Terminal**:

```bash
cd <your-project>
pma codex desktop
```

If Codex Desktop is already running, PMA explains that active tasks will stop and asks before one graceful restart. It then starts the embedded, version-matched Codex App Server and injects a temporary capture-provider definition only into the first new thread created in the current workspace. The App Server's global configuration and every other Desktop thread remain untouched. PMA reuses the existing Codex/ChatGPT login in memory and does not rewrite `~/.codex/config.toml`, install a certificate, or persist authentication values.

Do not start the restart flow from a Terminal embedded in the Codex Desktop task being captured. PMA detects that self-interruption case and refuses it. To pre-approve the restart in a script, use `pma codex desktop --capture exact --restart`.

Use semantic rollout observation when you do not want to restart or when managed exact capture is unavailable on the host:

```bash
pma codex desktop --capture rollout
pma codex desktop -c
pma codex desktop --select
```

`desktop -c` observes the current directory's latest session, while `--select` lists selectable sessions from that directory; `--resume` and `--list` remain advanced history tools. Rollout mode is read-only semantic evidence, not a complete wire request, and PMA does not copy rollout text into SQLite. `pma codex capture -- ...` remains a compatibility alias for exact Codex CLI capture.

To capture an existing Desktop session exactly, select it explicitly and open that conversation after the managed restart so Codex cold-resumes it through the capture provider:

```bash
pma codex desktop --resume <thread-id> --capture exact
pma codex desktop --select --capture exact
```

An already loaded thread cannot switch provider in place. PMA reports whether the selected thread was actually cold-resumed and routed; it never labels an untouched thread as exact capture.

## Resume A Claude Code Session

Resume a specific Claude Code session:
Expand Down
57 changes: 55 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# peekMyAgent

peekMyAgent 是一个本地优先的 Agent 请求观察工作台,用来查看 Claude Code、OpenClaw 等 coding agent 在调用模型前真正发送出去的请求
peekMyAgent 是一个本地优先的 Agent 请求观察工作台,用来查看 Claude Code、Codex、OpenClaw 等 coding agent 的执行链路和模型请求

它可以帮助你理解 Agent 如何组织 system prompt、用户消息、工具定义、工具调用、工具结果、历史上下文、模型参数和原始 JSON。peekMyAgent 不是用来“破解隐藏提示词”的工具,而是面向你自己授权的本地 Agent 会话的可观测性工具。

Expand Down Expand Up @@ -32,7 +32,9 @@ peekMyAgent 是一个本地优先的 Agent 请求观察工作台,用来查看

- 打开本地 dashboard:`http://127.0.0.1:43110`。
- 通过 `pma claude ...` 启动 Claude Code 并捕获模型请求。
- 在受支持的 macOS 版本上继续使用 Codex Desktop 原生界面并进行 Responses 精确捕获,也可显式退回零复制 rollout 观察,或通过精确代理启动 Codex CLI。
- 通过 `pma openclaw ...` 启动 OpenClaw 并捕获模型请求。
- 在左侧切换当前观察的 Agent,让 Codex、Claude Code、OpenClaw 和导入 Trace 分开显示。
- 在时间线中查看用户输入、System 摘要、Tools、Tool calls、Tool results、Response、token 统计和 Raw JSON。
- 识别并展示 Claude Code 子 Agent 请求流。
- 在 Claude Code 内通过 `/peekmyagent` 打开 dashboard。
Expand All @@ -43,7 +45,7 @@ peekMyAgent 是一个本地优先的 Agent 请求观察工作台,用来查看

- macOS、Windows 或 Linux。
- Node.js 24 或更新版本。peekMyAgent 当前使用 Node 内置的 `node:sqlite` 作为本地存储运行时。
- 已安装并可正常使用 Claude Code 或 OpenClaw。
- 已安装并可正常使用你准备观察的 Claude Code、Codex 或 OpenClaw。
- 模型供应商配置需要先在原 Agent 中可用。

如果 `claude` 本身不能运行,请先修好 Claude Code 配置:
Expand Down Expand Up @@ -133,6 +135,57 @@ pma claude -c --dangerously-skip-permissions

这个参数属于 Claude Code,不属于 peekMyAgent。它会绕过 Claude Code 的常规权限检查,只建议在你信任的仓库中使用。

## 快速开始:Codex

在希望观察的项目目录中,让 Codex 通过当前进程专属的精确代理启动:

```bash
cd <your-project>
pma codex
```

直接在该终端的 Codex TUI 中对话。看板会展示逐字请求/回复、工具 schema、调用和结果;PMA 不修改 `~/.codex/config.toml`,也不依赖本地 rollout 是否完整保存。

Codex 原生参数可以直接跟在后面:

```bash
pma codex resume --last
pma codex exec "检查这个仓库"
pma codex --dangerously-bypass-approvals-and-sandbox
```

最后一个命令会绕过审批和沙箱,只应在受信任的隔离环境中使用。`-c` 是 Codex 的配置覆盖参数,不表示 continue。

如果希望继续使用 Codex Desktop 原生界面,同时查看真实的完整上行与下行,请在**独立的系统终端**中执行:

```bash
cd <your-project>
pma codex desktop
```

在受支持的 macOS Codex Desktop 版本上,PMA 默认使用托管精确捕获。如果 Desktop 已经运行,PMA 会先说明正在运行的任务会被停止,并在获得同意后才做一次优雅重启。随后它启动 Desktop 内嵌、版本完全一致的 Codex App Server,并只在当前工作区随后新建的第一条 thread 的启动请求中注入临时捕获 provider 定义;App Server 的全局配置和其他 Desktop 会话保持原样。PMA 复用现有 Codex/ChatGPT 登录态,不改写 `~/.codex/config.toml`、不安装系统证书,也不会持久化认证值。

不要从当前 Codex Desktop 任务内嵌的终端启动这次重启;PMA 会检测并拒绝这种可能杀死自身控制器的操作。脚本中已经明确同意重启时,可使用 `pma codex desktop --capture exact --restart`。

不希望重启或当前平台暂不支持托管精确捕获时,使用只读 rollout 语义观察:

```bash
pma codex desktop --capture rollout
pma codex desktop -c
pma codex desktop --select
```

`desktop -c` 观察当前目录最近的会话,`--select` 只列出当前目录下可选择的会话;`--resume` 和 `--list` 用于高级历史观察。rollout 模式不是完整网络请求,正文也不会复制进 PMA SQLite。`pma codex capture -- ...` 暂作 Codex CLI 精确捕获的兼容别名。

如果要精确捕获一个已有 Desktop 会话,可以显式选择它;受管重启后再在 Desktop 中打开该会话,让 Codex 通过捕获 provider 冷恢复:

```bash
pma codex desktop --resume <thread-id> --capture exact
pma codex desktop --select --capture exact
```

已经加载的 thread 无法原地热切换 provider。PMA 会报告目标 thread 是否真的发生冷恢复和路由,不会把未改写的会话标成精确捕获。

## 快速开始:OpenClaw

```bash
Expand Down
Loading