Skip to content

External agent tools never appear in sessions that existed before the Codex integration was enabled #943

Closed

Description

@AnthonyRonning

Summary

The external-agents gating comment in crates/maple-agent/src/agent.rs (~line 8600, the .with_external_agents(...) filter) says:

The toggle is read at every agent build, so it takes effect at the next run.

Observed behavior contradicts this: a session that existed before the Codex integration was enabled never gains the five external-agent tools (list_agent_providers, agent_start, agent_send, agent_status, agent_cancel), even after the app is fully rebuilt, relaunched, and the session is resumed and continued with new messages.

Repro

  1. Have a chat session created before the Codex integration existed / was enabled.
  2. Enable Codex under Settings > Integrations.
  3. Relaunch the app, resume the old session, send a message.
  4. The task's tool list still lacks agent_start etc.

Expected

Per the code comment: the toggle is re-read at every agent build, so a resumed pre-existing session should gain the tools on its next run after the integration is enabled.

Actual

Only sessions created after the integration was enabled get the tools. A new session works correctly (Codex detected, signed in, tools usable).

Suspected cause

The developer extension's tool list is likely snapshotted into Goose's persisted session/extension state at session creation (sessions.db) and not refreshed on later agent builds for that session — similar to other per-session frozen config. The external_agents_enabled(...) check does run at agent build time, but its result may never reach a session whose developer extension was already materialized.

Workaround

Start a new task after enabling the integration.

Verified environment

  • Binary at commit 4178b1c
  • integrations.json shows "id": "codex", "enabled": true, "backend": "embedded"
  • Codex 0.154.0 signed in; new sessions work end to end

Activity

  1. benthecarman commented on Sep 16, 2026

    @benthecarman
    Contributor

    Couldn't reproduce on current master (0b0736ba): a task created with Codex disabled gained the external-agent tools after enabling Codex and restarting the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions