chenhg5/cc-connect · error
acp: parse session/list: %w
Error message
acp: parse session/list: %w
What it means
Raised in probeListSessions when the 'session/list' RPC returned a payload that failed to unmarshal into acpSessionListResult. Note that -32601/-32600 method-not-found errors are soft-skipped earlier; this error only fires on a successful reply with an unexpected body, i.e. a schema mismatch with the probed agent.
Source
Thrown at agent/acp/list_sessions.go:168
// method-not-found / invalid-request — callers interpret that as
// "unsupported" rather than "real error".
func probeListSessions(ctx context.Context, tr *transport, cwdFilter string) ([]acpSessionListEntry, error) {
params := map[string]any{}
if cwdFilter != "" {
params["cwd"] = cwdFilter
}
raw, err := tr.call(ctx, "session/list", params)
if err != nil {
if rpcErr, ok := err.(*rpcErrPayload); ok {
if rpcErr.Code == -32601 || rpcErr.Code == -32600 {
return nil, nil
}
}
return nil, err
}
var out acpSessionListResult
if err := json.Unmarshal(raw, &out); err != nil {
return nil, fmt.Errorf("acp: parse session/list: %w", err)
}
return out.Sessions, nil
}
// ListSessions returns past sessions reported by the ACP agent, scoped
// to the agent's work_dir. If the agent does not advertise
// sessionCapabilities.list or the call soft-fails, returns nil.
//
// This runs a one-shot `<command>` process that performs only
// initialize + session/list, so it does NOT allocate a real session on
// the backend (unlike session/new). Cost is roughly a single ACP
// handshake round-trip (~100-500ms for Devin).
func (a *Agent) ListSessions(ctx context.Context) ([]core.AgentSessionInfo, error) {
if a.listUnsupported.Load() {
// Already learned this agent doesn't support session/list;
// fast-path out to avoid respawning just to rediscover that.
return nil, nil
}View on GitHub (pinned to 4000b2338a)
Solutions
- Check whether the agent's session/list response format differs from what this cc-connect version parses
- Upgrade cc-connect or the agent CLI so both speak the same session/list schema
- Log the raw RPC payload to identify the offending field
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at agent/acp/list_sessions.go:168 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/5e54e955ff2fdc32.
Report an issue: GitHub.