Help us shape the future of Go! Take the 2026 Go Developer Survey

codex

package
v0.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 31 Imported by: 0

README

Codex through ACP

Use an installed Codex CLI from an ACP-compatible editor or client:

wingman acp codex

Configure the client to launch wingman with arguments ["acp", "codex"]. The default backend uses Codex's existing login, configuration, and session storage. Install Codex and sign in through its CLI first.

To use a Wingman gateway:

wingman acp codex --backend wingman

Set WINGMAN_URL and WINGMAN_TOKEN if the gateway requires them. The default gateway is http://localhost:4242.

Models, plans, and history

Use the model and effort controls offered by your ACP client, or pass --model ID and --effort LEVEL at startup.

A completed plan appears as conversation text. Clients with plan-implementation support can offer to implement it; approval starts a separate backend turn. Intermediate task lists are not shown as ACP plan notifications.

Loading a saved session replays its conversation and attachments. Command output is shown when the command completes and retains at most the last 1 MiB per command, with a marker when earlier output is omitted.

Troubleshooting

If authentication fails, sign in through the CLI and check inherited API credentials. If Codex reports an active writer, close the other process using that thread before resuming it. Restore a missing workspace directory or open a session whose workspace is still available.

A stalled backend start or cancellation can close the connection. Reconnect before sending another prompt. See the ACP setup guide for client configuration and compatibility.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options, in io.Reader, out io.Writer, logger *slog.Logger) error

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func Spawn

func Spawn(ctx context.Context, opts Options) (*Agent, error)

func (*Agent) Cancel

func (a *Agent) Cancel(ctx context.Context, params acpsdk.CancelNotification) error

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) CloseSession

func (*Agent) Done

func (a *Agent) Done() <-chan struct{}

func (*Agent) Initialize

func (*Agent) ListSessions

func (*Agent) LoadSession

func (*Agent) Logout added in v0.8.5

func (*Agent) NewSession

func (*Agent) Prompt

func (a *Agent) Prompt(ctx context.Context, params acpsdk.PromptRequest) (acpsdk.PromptResponse, error)

func (*Agent) ResumeSession

func (*Agent) SetAgentConnection

func (a *Agent) SetAgentConnection(conn *acpsdk.AgentSideConnection)

func (*Agent) SetSessionMode

func (*Agent) Steer added in v0.10.9

func (a *Agent) Steer(ctx context.Context, sessionID acpsdk.SessionId, prompt []acpsdk.ContentBlock, messageID string) error

func (*Agent) UnstableDeleteSession added in v0.8.5

func (*Agent) UnstableForkSession added in v0.15.8

type Options

type Options struct {
	Model string

	Effort string

	Path string
	Dir  string
	Env  []string

	ExtraArgs []string

	Stderr io.Writer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL