Skip to content

Add Goose as an agent provider #780

Closed

Description

@amaudruz

What

Add Goose as an agent provider, so a Switch agent can run on it: created in Switch Console, talking in rooms, asking for approvals like the existing Claude Code, Codex, OpenCode, Cursor and Antigravity agents.

Why

Open-source agent from the Linux Foundation, model-agnostic and widely used.

How

Goose supports ACP natively (goose acp, and ACP is becoming its main interface), so this should be an ACP hooks file on the generic adapter, a plugin entry and one line in each registry.

Follow:

Done when

  • Installed / not installed and signed in / signed out are detected without starting a login, with a "sign in with …" hint
  • It appears in Console's create-agent flow (model choice; advanced settings may be empty)
  • An agent on it joins a room, reads context and answers a mention
  • Tool use shows on the activity card; approvals can be approved and denied from the chat
  • A message sent mid-turn is queued; !interrupt stops a turn; the conversation resumes after a restart
  • Auto-approve works; the chosen model is actually used
  • Runs on a headless agent controller machine as well as in Console
  • The real-CLI integration test passes (or skips with a stated reason), and its summary is in the PR
  • Unit tests for the hooks
  • A short video of the steps above, per the PR template

Out of scope

Hosted cloud agents; logins pushed from Console.

Activity

  1. added
    hackathon
    priority: P1
    area: agent-cli
    on Oct 12, 2026
  2. RajdeepKushwaha5 commented on Oct 21, 2026

    @RajdeepKushwaha5

    Hi @petr-sandbox @amaudruz, I'd like to work on this one for the hackathon, if it's still available.

    I read new-agent-cli.md, add-an-agent-provider.md, acp/hooks.ts and the Cursor and Antigravity hooks, then read Goose's ACP server source (crates/goose/src/acp/server.rs), its mode enum and its environment-variable docs. Here is the plan.

    Launch
    goose acp. Its initialize advertises loadSession, session list, close and delete, image and embedded-context prompts, and HTTP MCP. The generic adapter already handles all of these, so the hooks stay small.

    The important part: Goose approves everything by default
    GOOSE_MODE defaults to auto, which approves every tool call, so without an explicit mode a Switch agent would never ask for approval. Goose's session/set_mode accepts its modes (auto, approve, smart_approve, chat), so sessionMode sets one on every session:

    • approval-required to approve (asks before every tool call);
    • auto-accept-edits and auto to smart_approve (asks only for sensitive calls);
    • full-access to auto.

    The approval conformance checks will confirm the requests actually arrive.

    Sign-in

    • Goose has no account. It's ready once a model provider is configured, through goose configure or GOOSE_PROVIDER / GOOSE_MODEL.
    • Its initialize always lists the same goose-provider method ("Configure Provider"), so the handshake can't tell the two states apart. Instead, checkSignIn checks for a configured provider in the environment or Goose's config, and never starts anything interactive.
    • loginCommand is goose configure. No authMethodId is sent.

    Headless machines
    Goose's docs warn that keyring access can block forever when no one is there to answer. On the agent controller, sessions run with GOOSE_DISABLE_KEYRING=1, and Goose then reads secrets from ~/.config/goose/secrets.yaml (%APPDATA%\Block\goose\config\secrets.yaml on Windows) or the environment. I'll document this. GOOSE_PROVIDER, GOOSE_MODEL and GOOSE_DISABLE_KEYRING aren't in the pass-through list, so they go in inheritEnv.

    Registration (the files listed in add-an-agent-provider.md)
    The hooks under src/goose/, acpProviderRuntime in providers/registry.ts, the plugin and icon under plugins/src/agents/impl/goose/, its line in plugin-registry.ts, and the entry in core/switch_core/providers/registry.py.

    Testing

    • Unit tests for the hooks, including the mode mapping.
    • goose.integration.test.ts with the ten conformance scenarios against the real CLI. Skips are recorded with the version and date, and go in the known-limits table.
    • A run on a headless agent controller, and the short Console video.
    • Before the PR: build, typecheck, lint, format check and tests across the console packages, plus just check, just typecheck and just test for the core change.

    Thanks!

  3. ANAMASGARD commented on Oct 21, 2026

    @ANAMASGARD

    Hi @amaudruz and @petr-sandbox — I see the existing Goose proposal and would also appreciate consideration if this is still available. I’d focus on a dependable local and headless setup with explicit permission behavior.

    • Add console/packages/agent-providers/src/goose/goose-acp.ts on AcpProviderHooks using the documented stdio launch, goose acp. Register the same id in the runtime, plugin and core/switch_core/providers/registry.py, with model-provider setup hints rather than assuming a Goose account login.
    • Verify the installed release’s session modes before mapping them with sessionMode: supervised calls must actually reach Switch’s permission handler. In providers/registry.ts, pass only necessary provider configuration via inheritEnv; check readiness without starting configuration or inference. Establish a noninteractive credential path on the headless controller before claiming support.
    • Proposed tests: launch/readiness/mode fixtures and the real-CLI describeConformance suite, especially approve/deny, actual chosen model, HTTP MCP, queued input, interrupt and restart/resume. Verify room context and tool activity in Console and on a headless machine, record exact CLI/backend versions and legitimate skip reasons, and include the short room demo. None of these tests has been run yet.
    flowchart LR
      A[Switch room] --> B[Shared ACP adapter and Goose hooks]
      B --> C[Configured Goose model provider]
    
    Loading

    Please consider me for assignment if available. I’ll coordinate the final issue choice and begin implementation only after assignment and within the allowed hackathon window.

  4. petr-sandbox commented on Oct 22, 2026

    @petr-sandbox
    Collaborator

    Thank you all for your interest and participation in our hackathon! In the interest of fairness, we will not be assigning issues to individual participants but instead let anyone try and solve any number of them.

  5. shivamcuj commented on Oct 26, 2026

    @shivamcuj

    Hi @petr-sandbox, I would like to be assigned to this issue.

    Plan: I will add Goose as an agent provider using its native goose acp mode via ACP adapter hooks in console/packages/agent-providers/src/goose/, add readiness and login detection, register the plugin in Console, and write unit tests for the hooks. Please assign this to me!

  6. mohanarora3 commented on Oct 29, 2026

    @mohanarora3
    Contributor

    @petr-sandbox I'm working on this one for the hackathon. I read new-agent-cli.md, add-an-agent-provider.md, acp/hooks.ts, the generic adapter and the Cursor and Antigravity hooks. I also read Goose's ACP server source (aaif-goose/goose, crates/goose/src/acp/).

    Proposed Approach

    Goose fits the generic adapter well:

    • goose acp advertises loadSession, image and embedded-context prompts, and HTTP MCP.
    • It offers mode and model as session config options.

    So this is a hooks file, a plugin, one line in each registry and one entry in core's table. Three Goose behaviours do need hooks, though. They're the main part of this plan (section 3).

    1. Launch and capabilities
    • Goose is launched as goose acp over stdio, with no extra flags.
    • steering: false, so a message sent mid-turn queues.
    • resume: true, through session/load. Goose keeps its sessions in its own SQLite store, so they survive a restart.
    • approvals: true and modelSwitchInSession: true.
    • userInput: false. Goose asks questions through ACP form elicitation, and the generic client doesn't advertise elicitation.
    • No authMethodId. initialize always lists goose-provider ("Configure Provider"), and all that method does is tell a person to run goose configure.
    1. Sign-in check
    • Goose has no account. It's ready once a provider and a model are configured, either with goose configure or with GOOSE_PROVIDER / GOOSE_MODEL.
    • The handshake can't tell the two states apart, because it lists the same method either way.
    • checkSignIn runs goose info -v with the session's environment:
      • It prints the resolved GOOSE_PROVIDER and GOOSE_MODEL (from the environment or config.yaml) without calling the model.
      • I parse only those two keys and never log the rest of the output.
      • It never runs goose info --check, because that sends a real model request.
    • As with a Cursor API key, the provider key can't be checked without spending a request. It's taken as given, and a bad key fails the first turn.
    • pressly/goose, a database migration tool, installs a binary with the same name. If that's the goose on PATH, the check says so instead of reporting "signed out".
    • loginCommand is goose configure.
    1. Permissions: three Goose specifics

    a) Goose mode for each runtime mode

    Goose's default mode is auto, which approves every tool call. A new ACP session starts in the user's global GOOSE_MODE. So sessionMode always sets a mode. It applies to that session only: Goose saves it on the session and never writes it back to the global config.

    Switch Goose Why
    approval-required approve asks before every tool call
    auto-accept-edits approve edits are accepted by the generic adapter once they're typed as edits (see c); commands still ask
    auto smart_approve Goose's own reviewer runs first, and whatever it can't clear goes to a person
    full-access auto no prompts

    chat is never used.

    b) "Always" is permanent and global in Goose

    • Goose offers allow_always, allow_once, reject_once and reject_always, named by those raw ids.
    • Picking allow_always writes "always allow" for that tool into Goose's global permission.yaml (agents/state_machine/ops_tool_approval.rs).
    • That outlives the Switch session and covers every Goose session on the machine.
    • The generic adapter shows allow_always as "allow for this session", so Switch must not offer it for Goose.
    • The hook keeps only allow_once and reject_once, with readable labels ("Allow once", "Reject") instead of the raw ids.

    c) Goose doesn't type its tool calls

    Every Goose tool call and permission request has kind other (ToolKind::default() in server/tool_calls/conversion.rs). Without hooks, that means:

    • every approval card says "tool" instead of "command" or "file change";
    • auto-accept-edits never accepts an edit;
    • in approve mode, Switch's own MCP tools ask for permission too, so the agent would ask before replying in the room.

    The hooks fix this:

    • mcpServerOf reads _meta.goose.toolCall.extensionName. Goose names an ACP-provided server's tools <server>__<tool>. With this, Switch's own servers are approved without asking, as they are for the other providers.
    • itemType reads _meta.goose.toolCall.toolName:
      • developer__shell → command_execution
      • developer__write and developer__edit → file_change
      • summon__delegate → subagent
    • The permission request has no _meta, only Goose's generated title (developer: shell · …). The permission hook sets kind execute or edit from that prefix. Anything it doesn't recognise stays other and asks.
    const MODES: Record<RuntimeMode, string> = {
      'approval-required': 'approve',
      'auto-accept-edits': 'approve',
      auto: 'smart_approve',
      'full-access': 'auto',
    };
    
    export const gooseAcp: AcpProviderHooks = {
      provider: 'goose',
      label: 'Goose',
      defaultBinary: 'goose',
      capabilities: {
        modelSwitchInSession: true,
        steering: false,
        resume: true,
        approvals: true,
        userInput: false,
      },
      launch: ({ binaryPath, env }) => ({ command: binaryPath, args: ['acp'], env }),
      loginCommand: 'goose configure',
      inheritEnv: ['GOOSE_PROVIDER', 'GOOSE_MODEL', 'GOOSE_DISABLE_KEYRING'],
      checkSignIn: checkGooseProvider, // `goose info -v`, never `--check`
      sessionMode: (mode) => MODES[mode],
      mcpServerOf: (call) => gooseToolMeta(call)?.extensionName,
      itemType: (call) => GOOSE_ITEM_TYPES[gooseToolMeta(call)?.toolName ?? ''],
      // Keeps allow_once / reject_once with readable labels and sets the kind from
      // Goose's title, then lets the generic adapter decide as for any provider.
      permission: (_context, request) => {
        onceOnly(request);
        return undefined;
      },
    };
    1. Headless machines
    • Goose keeps API keys in the OS keyring by default.
    • Without a keyring it usually falls back to secrets.yaml, and GOOSE_DISABLE_KEYRING forces that.
    • inheritEnv passes through GOOSE_PROVIDER, GOOSE_MODEL and GOOSE_DISABLE_KEYRING. Provider keys (OPENAI_API_KEY, ANTHROPIC_API_KEY…) already pass through.
    • I won't force GOOSE_DISABLE_KEYRING on. On a desktop it would hide keys Goose saved in the keychain.
    • The docs will say: on a controller machine, configure with GOOSE_DISABLE_KEYRING=1 goose configure, or use environment keys.
    • I'll test on a headless Linux controller and name the distribution in the PR.
    1. Registration (only the files in add-an-agent-provider.md)
    • src/goose/goose-acp.ts, and acpProviderRuntime(gooseAcp) in PROVIDER_RUNTIMES.
    • The plugin in plugins/src/agents/impl/goose/ (index.ts, icon.ts), modelled on Antigravity's: mcp and prompt set to none, and a buildCommand that throws.
    • Install commands:
      • brew install block-goose-cli on macOS;
      • the official script with CONFIGURE=false on macOS and Linux, so installing doesn't start the interactive goose configure;
      • the PowerShell script on Windows.
    • The core entry: id goose, label Goose, sign_in_command="goose configure", and tools shell, write, edit, tree and delegate.
    1. Questions for you

    2. The permission hook in 3b and 3c rewrites the request's options and kind, then returns undefined so the generic adapter's auto-approval still applies. No hook does that today. Is that fine, or would you rather have a small optional hook in the generic adapter for it?

    3. A tool someone already set to "Always allow" in Goose's own permission.yaml runs without asking, even in approval-required. Switch can't see that without moving Goose's config dir (GOOSE_PATH_ROOT), which would also hide the provider setup. I'd document it as a known limit. OK?

    4. Tests, QA and video

    • Unit tests for the hooks:
      • mode mapping;
      • goose info parsing (configured, missing, and a different goose on PATH);
      • the option rewrite and the kinds;
      • mcpServerOf and itemType from _meta.
    • Real-CLI test: goose.integration.test.ts with the 10 conformance scenarios.
      • I expect user-input to be skipped, because of elicitation.
      • Results go in the PR with the Goose version and date, plus a row in the known-limits table.
    • Model discovery check: model discovery opens a real Goose session. I'll check whether it leaves an empty session in goose session list and record it if it does.
    • Manual runs: a run on a headless controller, and a Console video showing:
      • signed in;
      • creating an agent and picking a model;
      • a reply in a room;
      • an approval accepted and one declined;
      • !interrupt;
      • resume after a restart;
      • full access.
    • Before the PR:
      • in console/: build, typecheck, lint, format check and tests;
      • at the repo root: just check, just typecheck and just test for the core change.
  7. petr-sandbox commented on Oct 29, 2026

    @petr-sandbox
    Collaborator

    Sorry for the contradictory instructions earlier: issues are now assigned to everyone who expressed interest, and the resulting PRs will be reviewed after the hackathon time window. Only one PR will be selected per issue.

  8. AbarnaaSree commented on Oct 29, 2026

    @AbarnaaSree

    Hi @petr-sandbox and @amaudruz 👋

    I’m interested in contributing to the Add Goose as an agent provider issue (#780) for the Flip the Switch Hackathon. I’ve reviewed the requirements and would like to help implement the integration using Switch’s existing ACP adapter, along with the necessary tests.

    I noticed that PR #1143 has already been submitted and several contributors are involved. Would an additional contribution still be useful? I’d appreciate your guidance before getting started.

    Thank you! 🙌

  9. napraveen commented on Oct 29, 2026

    @napraveen

    Hi @petr-sandbox and @amaudruz , I have implemented the Goose agent provider over ACP with non-interactive sign-in detection and permission mode mapping, verified with 100% passing unit and conformance integration tests and a demo video. PR is open for review at #1149: #1149

  10. 4 remaining items

  11. added a commit that references this issue on Nov 4, 2026
    c67c2b9
  12. Souravrajvi0 commented on Nov 4, 2026

    @Souravrajvi0
    Contributor

    I've opened #1439 (draft) for this. I built it against a real goose acp session (Goose 1.57.0, Ubuntu 24.04), driven over raw ACP with every message recorded. A few things Goose actually does differ from what this thread assumed:

    • Permission requests have _meta: null and kind: "other". The title is shell · <command> / write · <path> / edit · <path>, not developer: shell · …. A hook that matches on developer: never fires, so every command shows as a generic tool approval and auto-accept-edits never accepts an edit. feat(agent-providers): add Goose as an agent provider (#780) #1439 reads the kind from the title prefix plus the tool's rawInput.
    • allow_always is machine-wide and permanent. Choosing it wrote always_allow: [shell] to ~/.config/goose/permission.yaml. The generic adapter would show it as "allow for this session", so feat(agent-providers): add Goose as an agent provider (#780) #1439 offers only the once options.
    • Sessions start in auto (approves everything), confirming the need to set a mode on every session.
    • The session's own MCP tools run without asking. The earlier tool_call names the server in _meta.goose.toolCall.extensionName, and the permission reuses its toolCallId. Verified in approval-required mode: the echo tool ran with no prompt.
    • goose info -v prints GOOSE_PROVIDER / GOOSE_MODEL once configured and never prints the key, so sign-in is checked without a model call.

    Real-CLI conformance so far: simple-turn, file-write, approval-required, approval-declined and resume pass. Interrupt and MCP work in logged runs but hit the free Gemini tier's quota inside the suite. I'm rerunning those, plus subagent, steer and user-input, with more quota, and will update the PR with the full summary and the Console video.

    @petr-sandbox happy to be assigned if that helps.

  13. sohamsssssssssssssssss commented on Nov 4, 2026

    @sohamsssssssssssssssss

    Hi @petr-sandbox and @amaudruz 👋

    I’d like to be assigned to Add Goose as an agent provider (#780) for the Flip the Switch Hackathon. I already have a working provider on goose acp (hooks on the generic adapter, mode mapping, readiness check, Console plugin, registrations), tested live in Console and Mattermost with approve, deny and !interrupt. I’m finishing the remaining acceptance items now. Could you assign it to me?

    Thank you! 🙌

  14. BUTTERFINGERS7498 commented on Nov 4, 2026

    @BUTTERFINGERS7498

    Hi @petr-sandbox, I'd like to add Goose through goose acp and reuse the existing adapter. I'll check that it picks up the chosen model, asks for permissions when it should, and can resume after a restart. I'll cover both Console and the headless controller, and note anything I couldn't verify with a real model account.

  15. whatever0148-cmd commented on Nov 5, 2026

    @whatever0148-cmd
    Contributor

    @petr-sandbox I would like to work on this. Plan: goose acp on the generic ACP adapter with Goose-specific hooks for its sign-in and model provider handling, registered next to cursor, and the conformance suite run on the real binary. Local result on goose 1.56.0 with a free Gemini model: 9 of 10 pass, 1 skipped with the reason recorded in the README.

  16. petr-sandbox commented on Nov 6, 2026

    @petr-sandbox
    Collaborator

    @whatever0148-cmd I've assigned you.

  17. ayushkumar2601 commented on Nov 6, 2026

    @ayushkumar2601

    Hi @petr-sandbox — I've implemented Goose as an agent provider via native ACP over stdio in #1653. It includes ACP hooks (goose acp with --auto-approve true), non-intrusive auth check, Console plugin & icon, Core registry entries, and full unit test coverage. Ready for review!

  18. added a commit that references this issue on Nov 11, 2026
    98e563c
  19. added a commit that references this issue on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: agent-clidifficulty: mediumhackathonpriority: P1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions