pub(super) fn packet_history_tail(
filestore: Option<&FileStore>,
block_id: &str,
global: Option<(&FileStore, &str)>,
max_bytes: i64,
) -> Option<(Vec<u8>, bool)>Expand description
The transcript a continuation packet is built from: the agent’s global zone when the pane has one, else the pane’s own transcript.
Deliberately NOT pane_history_tail’s local-first order. The zone
mirrors every append to the pane file, so it holds everything the pane
does, plus the conversation from earlier channels and builds. On a new
channel the pane file is created by a rejected resume’s own settlement
(the session-outcome line and the CLI’s error result), and reading it
first built no packet at all while the global record held the whole
conversation (REPORT_AGENT_HISTORY_LOST_ON_NEW_BUILD_2026_09_25.md §4).