Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature Request: Session Export and Replay for Agent Debugging

未关闭
#1,586 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
java, typescript

调研方向

首先检查 Copilot SDK 现有的会话处理方式,以及 issue 中展示的拟议 loadSession/replay API。确定应如何表示导出的消息、工具调用、MCP 交互、元数据和模型配置,然后定义导出会话并重放会话以进行调试或测试的完成标准。

由索引模型根据 Issue 内容生成。

描述

enhancement

Title

Feature Request: Session Export and Replay for Agent Debugging

Description

Problem

When building agents with the Copilot SDK, debugging complex multi-turn conversations can be difficult.

Developers often encounter situations where:

  • An agent behaves unexpectedly after several turns.
  • A tool invocation produces an incorrect result.
  • Context accumulation affects later responses.
  • Bugs only appear after a specific sequence of interactions.

Currently, reproducing these issues typically requires manually recreating the entire conversation flow.

Proposed Solution

Add session export and replay capabilities to the Copilot SDK.

Session Export

Allow developers to export a session including:

  • User messages
  • Assistant messages
  • Tool calls
  • Tool results
  • MCP interactions
  • Session metadata
  • Model configuration

Example:

{
  "sessionId": "...",
  "messages": [...],
  "toolCalls": [...],
  "metadata": {...}
}
Session Replay

Provide APIs to replay exported sessions for debugging and testing.

Example:

const session = await sdk.loadSession("./session.json");

await session.replay();
Optional Features
  • Replay until a specific turn
  • Step-by-step execution
  • Compare outputs across SDK versions
  • Compare outputs across models
  • Deterministic replay mode
Use Cases
Agent Development

Reproduce user-reported failures without requiring users to recreate conversations.

Regression Testing

Verify that SDK upgrades do not change agent behavior unexpectedly.

Tool Debugging

Inspect exactly how tool calls and results affected agent decisions.

Benchmarking

Compare responses across different models using the same session history.

Benefits
  • Easier debugging
  • Better reproducibility
  • Improved regression testing
  • Faster issue triage
  • Better developer experience for agent builders
Alternatives Considered
  • Manual logging of messages
  • Custom session serialization
  • Third-party observability platforms

These approaches require significant additional implementation and are not standardized across SDK users.

主要语言
Java
星标
10.5k
派生
1.5k
平均合并
1 天 9 小时
30 天内合并 PR
130

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。