Summary
Clicking “Open session … as new tab” in History fails for local Claude Code (no tab opens, AgentSessions read error). For local Codex, a tab opens but is empty.
Environment
- Maestro: 0.14.5
- OS: Windows
- Agents: Claude Code (local), Codex (local)
Repro A — Local Claude Code
- Open History.
- Click “Open session … as new tab” for a history entry that belongs to a different local project than the current active session.
- Nothing opens; log adds:
[ERROR] [[AgentSessions]] read error {}
Expected: new tab opens with stored session messages
Actual: no tab opens; AgentSessions read error
Likely root cause (code)
- History button only passes
agentSessionId (no project path).
src/renderer/components/HistoryPanel.tsx:629
onOpenSessionAsTab is wired directly to handleResumeSession.
src/renderer/hooks/props/useRightPanelProps.ts:220
handleResumeSession always uses activeSession.projectRoot for agentSessions.read.
src/renderer/hooks/agent/useAgentSessionManagement.ts:165-195
If the history entry belongs to another local project, it reads the wrong path and throws.
Suggested fix
Thread projectPath (and sshRemoteId where relevant) from History → RightPanel → handleResumeSession, and use those when reading stored sessions.
Repro B — Local Codex
- Run Codex in Maestro and generate History entries.
- Click “Open session … as new tab” for a Codex history entry.
- A new tab opens but has no messages.
Expected: tab loads stored Codex session messages
Actual: tab is empty
Likely root cause (code)
Codex session ID from output uses thread_id, and stored sessions use “session_meta” with payload.id.
findSessionFile() only checks:
- filename UUID
metadata.id
but not metadata.payload.id
So session file is not found; read returns empty.
Relevant code:
src/main/parsers/codex-output-parser.ts:210,414 (sessionId from thread_id)
src/main/storage/codex-session-storage.ts:917-946 (findSessionFile does not check payload.id)
Suggested fix
Update findSessionFile() to match metadata.payload?.id as well as metadata.id.
Extra
The log message shows {} because the error is stringified without message; optional: include error message/code in AgentSessions read failure logs.
Summary
Clicking “Open session … as new tab” in History fails for local Claude Code (no tab opens,
AgentSessionsread error). For local Codex, a tab opens but is empty.Environment
Repro A — Local Claude Code
Expected: new tab opens with stored session messages
Actual: no tab opens;
AgentSessions read errorLikely root cause (code)
agentSessionId(no project path).src/renderer/components/HistoryPanel.tsx:629onOpenSessionAsTabis wired directly tohandleResumeSession.src/renderer/hooks/props/useRightPanelProps.ts:220handleResumeSessionalways usesactiveSession.projectRootforagentSessions.read.src/renderer/hooks/agent/useAgentSessionManagement.ts:165-195If the history entry belongs to another local project, it reads the wrong path and throws.
Suggested fix
Thread
projectPath(andsshRemoteIdwhere relevant) from History → RightPanel →handleResumeSession, and use those when reading stored sessions.Repro B — Local Codex
Expected: tab loads stored Codex session messages
Actual: tab is empty
Likely root cause (code)
Codex session ID from output uses
thread_id, and stored sessions use “session_meta” withpayload.id.findSessionFile()only checks:metadata.idbut not
metadata.payload.idSo session file is not found; read returns empty.
Relevant code:
src/main/parsers/codex-output-parser.ts:210,414(sessionId fromthread_id)src/main/storage/codex-session-storage.ts:917-946(findSessionFile does not checkpayload.id)Suggested fix
Update
findSessionFile()to matchmetadata.payload?.idas well asmetadata.id.Extra
The log message shows
{}because the error is stringified without message; optional: include error message/code inAgentSessionsread failure logs.