fix: nil Preamble on restored paused sessions

The persist path created agents with &Runtime{} (nil Preamble).
If a prompt arrived before resume rebuilt the runtime, Preamble.Set
panicked. Initialize with an empty Preamble.
This commit is contained in:
Levi Neely 2026-08-14 08:42:03 +02:00
parent 6d0a080e65
commit a8fd7a658f
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ func restoreMultiAgentSession(ps *PersistedSession) (*RestoredSession, error) {
history := agent.RestoreHistoryFromMessages(pa.Messages)
ag := agent.NewAgent(agent.AgentParams{
History: history,
Runtime: &agent.Runtime{},
Runtime: &agent.Runtime{Preamble: &agent.Preamble{}},
Profile: pa.Profile,
AgentsDir: pkgAgentsDir,
ID: pa.ID,