You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-80fb--tui-sub-agent...

1.5 KiB

title status type priority created_at updated_at
TUI sub-agent transcript always empty: sessionId serde rename missing completed bug normal 2026-03-31T22:32:07Z 2026-03-31T22:33:04Z

When selecting a sub-agent in the TUI transcript screen, the transcript is always empty.

Root cause: RawEntry.session_id has no #[serde(rename = "sessionId")] attribute. The JSONL field is camelCase ("sessionId") but serde only matches literal field names, so entry.session_id is always None after deserialization.

This causes read_session_id_from_first_line (discovery.rs) to always return None, so AgentRef.session_id defaults to empty string.

In load_transcript_for_agent, the find predicate uses s.session_id.starts_with(parent_session_id) — and in Rust, any_string.starts_with("") is always true. So it matches the first session in filesystem order (wrong session), fails to find the agent there, and returns with no entries loaded.

Fix: Add #[serde(rename = "sessionId")] to RawEntry.session_id in models/session.rs.

Summary of Changes

Added #[serde(rename = "sessionId")] to RawEntry.session_id in src/models/session.rs.

This causes read_session_id_from_first_line to correctly parse the parent session UUID from agent JSONL files, so AgentRef.session_id is populated with the real UUID instead of defaulting to empty string. The TUI load_transcript_for_agent function then correctly locates the parent session and loads the agent transcript.