aaif-goose/goose · warning

/compact is not available for provider '{provider}' because

Error message

/compact is not available for provider '{provider}' because it manages its own conversation context

What it means

Returned by the /compact slash command when the active provider reports manages_own_context() == true (ACP-style agents that keep and trim their own conversation state). Compaction is goose-side history rewriting, which would fight the provider's own context management, so the command is refused by design. The message names the command and provider for the user.

Source

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

                if let Some(message) = self
                    .handle_recipe_command(command, params_str, session_id)
                    .await?
                {
                    #[cfg(feature = "telemetry")]
                    crate::posthog::emit_custom_slash_command_used();
                    return Ok(Some(message));
                }

                self.handle_skill_command(command, params_str, session_id)
                    .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

View on GitHub (pinned to 3810898a74)

Solutions

  1. Do nothing — the provider already handles context compaction internally; this is expected behavior
  2. If you need goose-managed compaction, switch the session to a standard (non-ACP) provider
  3. In UIs/scripts, check provider.manages_own_context() first and hide or skip the compact action

Example fix

// before
agent.execute_command("/compact", session_id).await?; // Err for ACP providers

// after
let provider = agent.provider().await?;
if !provider.manages_own_context() {
    agent.execute_command("/compact", session_id).await?;
}
Defensive patterns

Strategy: validation

Validate before calling

// Rust — gate /compact on the provider's context capability
let provider = agent.provider().await?;
if provider.manages_own_context() {
    // skip compaction; the provider manages its own context
} else {
    agent.execute_command("/compact", session_id).await?;
}

Prevention

When it happens

Trigger: Running /compact (or calling execute_command with "/compact") in a session whose provider is an ACP agent such as claude-code that manages its own context window.

Common situations: Switching a workflow from a standard provider to an ACP provider while keeping the /compact habit; desktop users clicking a compact action that is not provider-aware; scripts that always run /compact after N turns.

Related errors


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