Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.
This repository was archived by the owner on Jun 25, 2026. It is now read-only.

Add Goose ACP mode while preserving direct Codex/Claude runtimes #205

Description

@rtzll

Summary

Rascal currently supports four runtime modes:

  • codex: direct Codex CLI
  • claude: direct Claude Code CLI
  • goose-codex: Goose using the legacy codex CLI provider
  • goose-claude: Goose using the legacy claude-code CLI provider

Goose has now introduced ACP-based providers and deprecated the legacy CLI-provider path. We should add an explicit Goose ACP mode without disturbing the existing direct runtimes.

The goal of this issue is to:

  • keep direct codex working exactly as today with auth.json
  • keep direct claude working exactly as today with the OAuth token file
  • keep legacy Goose behavior available initially
  • add ACP-backed Goose behavior as an explicit mode
  • disable Goose task-session resume when ACP mode is enabled, because Goose ACP currently does not support goose session resume / fork

Current Modes

Direct modes

  1. codex
  • Executes codex directly
  • Uses CODEX_HOME / CODEX_AUTH_FILE
  • Supports task-session resume via task-scoped CODEX_HOME
  1. claude
  • Executes claude directly
  • Uses CLAUDE_CONFIG_DIR / CLAUDE_CODE_OAUTH_TOKEN_FILE
  • Supports task-session resume via Claude session reuse

Goose legacy modes

  1. goose-codex
  • Executes goose
  • Sets GOOSE_PROVIDER=codex
  • Relies on Codex auth/config being present
  • Supports Goose named-session resume
  1. goose-claude
  • Executes goose
  • Sets GOOSE_PROVIDER=claude-code
  • Relies on Claude auth/config being present
  • Supports Goose named-session resume

New Modes / Concepts We Need

Add a Goose provider mode separate from the existing runtime enum.

Suggested shape:

  • legacy
  • acp

This keeps the existing runtime model intact and avoids a large refactor.

Effective Goose provider mapping

For Goose runtimes only:

  • goose-codex + legacy => GOOSE_PROVIDER=codex
  • goose-codex + acp => GOOSE_PROVIDER=codex-acp
  • goose-claude + legacy => GOOSE_PROVIDER=claude-code
  • goose-claude + acp => GOOSE_PROVIDER=claude-acp

Note:

  • chatgpt_codex exists as a Goose-native provider, but it is not the ACP mode this issue is implementing.
  • If we want Goose-native ChatGPT OAuth later, do that in a follow-up issue.

Scope

In scope

  • Add a Goose provider mode config/env
  • Wire Goose provider selection from runtime + goose_provider_mode
  • Install ACP adapter packages in Goose runner images
  • Preserve direct Codex/Claude behavior exactly as-is
  • Disable Goose task-session resume when ACP mode is enabled
  • Add tests and docs for the new mode

Out of scope

  • Replacing the existing runtime enum with a larger runtime matrix
  • Changing credential storage schema
  • Implementing Goose-native chatgpt_codex
  • Full end-to-end auth bootstrap UX for every ACP provider beyond reusing current CLI auth homes/config

Why This Can Stay Compact

We already separate:

  • Goose state: GOOSE_PATH_ROOT
  • Codex state/auth: CODEX_HOME, CODEX_AUTH_FILE
  • Claude state/auth: CLAUDE_CONFIG_DIR, CLAUDE_CODE_OAUTH_TOKEN_FILE

That means we can add ACP as a transport choice inside the Goose path without touching the direct paths or the overall scheduler/orchestrator model.

Implementation Plan

1. Add Goose provider mode config

Add a new config/env knob, server-side, for example:

  • RASCAL_GOOSE_PROVIDER_MODE=legacy|acp

Default: legacy

This should only affect Goose runtimes.

Suggested places to thread it through:

  • config loading / server config
  • runner spec / environment contract
  • docs / deploy flags as needed

2. Derive Goose provider from runtime + mode

Update Goose env construction so GOOSE_PROVIDER is no longer hardcoded only by runtime.

Current behavior is implemented in:

  • internal/runner/docker.go

Change it to:

  • direct runtimes: unchanged
  • Goose runtimes: select provider string from agent runtime + goose provider mode

Keep the current GOOSE_MODEL behavior unless ACP providers require something else.

3. Install ACP adapters in Goose runner images

Update Goose runner images to include the required ACP adapters.

Expected additions in Goose images:

  • @zed-industries/codex-acp
  • @zed-industries/claude-agent-acp

Keep existing goose, codex, and claude binaries installed.

Likely file:

  • runner/Dockerfile

4. Disable Goose task-session resume for ACP mode

Important: Goose ACP providers currently do not support session resume/fork.

Implementation requirement:

  • when runtime harness is Goose and provider mode is acp, do not create/use task-scoped Goose resume state
  • ensure runner invocation does not pass --resume for Goose ACP runs

Simplest behavior:

  • treat Goose ACP runs as effectively SessionModeOff for Goose session resume
  • keep direct codex / claude resume unchanged

Prefer disabling this at orchestration time rather than allowing a resume attempt to fail later.

Likely files:

  • internal/orchestrator/execution.go
  • internal/worker/agent_runtime.go

5. Keep auth assumptions unchanged in v1

For the first ACP implementation, do not redesign credentials.

Expected behavior:

  • direct codex keeps using current auth.json
  • direct claude keeps using current OAuth token file
  • Goose ACP continues to receive the same CODEX_HOME / CLAUDE_CONFIG_DIR mounts and files as today
  • ACP adapters are expected to use the already-authenticated underlying CLI/config

If that assumption proves false for a provider, open a follow-up issue for provider-specific auth bootstrap.

6. Tests

Update/add tests for:

  • Goose env construction for legacy vs acp
  • direct runtimes remain unchanged
  • Goose ACP disables resume
  • Goose legacy still supports resume
  • Docker env/image selection still correct

Likely files:

  • internal/runner/docker_test.go
  • internal/worker/agent_runtime_test.go
  • cmd/rascal-runner/main_test.go
  • any config parsing tests needed

Acceptance Criteria

  • direct codex runtime behavior is unchanged
  • direct claude runtime behavior is unchanged
  • legacy Goose behavior remains available and is still the default
  • ACP mode can be enabled for Goose runtimes via config/env
  • Goose Codex uses codex-acp in ACP mode
  • Goose Claude uses claude-acp in ACP mode
  • Goose ACP runs do not attempt session resume
  • docs clearly describe:
    • current modes
    • ACP mode
    • the fact that Goose ACP resume is disabled
  • test coverage is added for env selection and resume behavior

Suggested Order

  1. Add config/env and plumb it through
  2. Update env builder/provider selection
  3. Update Goose images with ACP adapters
  4. Disable Goose resume in ACP mode
  5. Add tests
  6. Update docs

References

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions