mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Fix error timeline for failed Codex MCP turns
This commit is contained in:
@@ -1216,6 +1216,14 @@ class CodexMcpAgentSession implements AgentSession {
|
||||
(event as { error?: { message?: string } }).error ??
|
||||
((data as { error?: { message?: string } } | null)?.error ?? null);
|
||||
const error = errorRecord?.message ?? "Codex MCP turn failed";
|
||||
if (!this.turnState?.sawError) {
|
||||
this.emitEvent({
|
||||
type: "timeline",
|
||||
provider: "codex-mcp",
|
||||
item: { type: "error", message: error },
|
||||
});
|
||||
this.turnState && (this.turnState.sawError = true);
|
||||
}
|
||||
this.emitEvent({ type: "turn_failed", provider: "codex-mcp", error });
|
||||
break;
|
||||
}
|
||||
|
||||
3
plan.md
3
plan.md
@@ -121,7 +121,8 @@ Build a new Codex MCP provider side‑by‑side with the existing Codex SDK prov
|
||||
- [x] **Fix**: Codex MCP thread/item event mapping should capture file_change, mcp_tool_call, web_search, and todo_list.
|
||||
- **Done (2025-12-24 19:40)**: Normalized thread event types and added data fallback so item events map to timeline entries.
|
||||
|
||||
- [ ] **Fix**: Codex MCP should emit error timeline items for failed turns.
|
||||
- [x] **Fix**: Codex MCP should emit error timeline items for failed turns.
|
||||
- **Done (2025-12-24 19:42)**: Emitted error timeline item on `turn.failed` when no prior error was recorded.
|
||||
|
||||
- [ ] **Fix**: Codex MCP persistence should include conversationId metadata for resume.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user