aaif-goose/goose · warning

Session has no conversation

Error message

Session has no conversation

What it means

Thrown by the /compact command when the loaded session has no conversation: manager.get_session(session_id, true) succeeded but session.conversation is None. Compaction rewrites stored history, so with nothing stored there is nothing to compact. Most often this means the session was created but never persisted a message.

Source

Thrown at crates/goose/src/agents/execute_commands.rs:186

                    .await
            }
        }
    }

    async fn handle_compact_command(&self, session_id: &str) -> Result<Option<Message>> {
        let provider = self.provider().await?;
        if provider.manages_own_context() {
            return Err(anyhow!(context_management_unsupported_message(
                "compact",
                provider.get_name()
            )));
        }

        let manager = self.config.session_manager.clone();
        let session = manager.get_session(session_id, true).await?;
        let conversation = session
            .conversation
            .ok_or_else(|| anyhow!("Session has no conversation"))?;

        let model_config = self.model_config_for_session(session_id).await?;
        let compaction = compact_messages(
            provider.as_ref(),
            &model_config,
            session_id,
            &conversation,
            true, // is_manual_compact
        )
        .await?;

        manager
            .replace_conversation(session_id, &compaction.conversation)
            .await?;

        self.update_session_metrics(
            session_id,
            session.schedule_id,

View on GitHub (pinned to 3810898a74)

Solutions

  1. Send at least one message in the session before running /compact
  2. Verify the session id is the one you actually messaged in
  3. If the session file should have history, inspect it in the session store for a missing conversation section
Defensive patterns

Strategy: validation

Validate before calling

// Rust — confirm the session has history before compacting
let session = manager.get_session(session_id, true).await?;
if session.conversation.is_none() {
    // nothing to compact; send at least one message first
}

Prevention

When it happens

Trigger: Running /compact on a freshly created session before any user/assistant message was saved, or on a session whose conversation payload failed to persist/was never written to storage.

Common situations: Users running /compact immediately after session creation; automations issuing /compact unconditionally; partially written session files after a crash.

Related errors


AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16). Data as JSON: /api/errors/60cf2c0cff1beef1. Report an issue: GitHub.