Skip to content

[Bug] History sync from a custom ACP agent fails: no launch command configured #187

Description

@tantan1hao

Affected area

Agent runtime / ACP

Installation method

Built from source

Lody version or commit

966623d

Operating system

macOS 26.4.1 arm64

Agent or runtime

Any cliType: custom ACP agent (reproduced with a small read-only ACP server that implements session/list and session/load)

What happened?

History sync from a custom ACP agent always fails with:

Custom ACP <agentType> has no launch command configured

A custom agent appears in the history-provider list — providers are built from every agent config on the machine, with no allowlist — so the UI offers it, but syncing from it can never succeed.

The cause is that LocalProjectHistoryProvider carries only cliType and agentType. That pair is enough for builtin and registry agents, whose executable resolves from a static table keyed by agentType. A custom agent's command is user-defined and lives on its agent config as customAcp, and nothing on the history path reads it, so resolveCustomACPSetting throws.

This makes the whole external-history feature unreachable for custom agents, which is the only way to import history from a tool that ships no ACP implementation of its own.

What did you expect?

History sync to spawn the custom agent using the customAcp command recorded on its agent config, the same command the agent uses everywhere else.

How can we reproduce it?

  1. Register a custom ACP agent that implements session/list and session/load, and advertises agentCapabilities.sessionCapabilities.list and loadSession. A minimal stdio server is enough.
  2. Add a local project.
  3. Open project settings and sync history for that agent (or send local-project/sync-history over the project-control RPC with provider: { cliType: 'custom', agentType: '<yours>' }).
  4. Observe the failure. The agent process is never spawned.

How often does it happen?

Every time

Relevant log output

project request parsed: type=local-project/sync-history
project request completed: type=local-project/sync-history ok=false error=execution_failed
Failed to sync history: Custom ACP <agentType> has no launch command configured

Additional context

The provider reaches resolveHistoryACPProcessLaunchresolveACPProcessLaunchAsyncresolveACPSettingresolveCustomACPSetting(agentType, input.customAcp) with customAcp undefined, because it was never on the provider.

Worth noting for whoever picks this up: the history service is constructed in four independent places — MessageHandler plus three branches in the fleet dispatcher (sync, import, resolve-conflict) — and each passes the request's provider straight through. A fix applied to only one of them looks correct in review but leaves the path the CLI actually takes still broken; the symptom is identical, which makes it easy to conclude the fix did not work.

I have a working patch and am happy to open a PR if a maintainer agrees on the approach. Two shapes seem possible:

  • resolve the launch spec on the daemon, looking the agent config up by cliType:agentType on the owning machine — leaves the control-plane schema unchanged and always uses the current command rather than one snapshotted when the request was built; or
  • carry customAcp on the provider through the request — smaller, but it widens the wire contract and every construction site still has to be updated.

Either way a single owner for that resolution would prevent the next entry point from reintroducing it.

Before submitting

  • I searched the existing issues and did not find a duplicate.
  • This report concerns an open-source component in this repository, not a hosted service, Web or mobile app, account, or billing issue.
  • This is not a security vulnerability; security reports follow the repository's security policy.
  • I removed credentials, private source, conversations, prompts, personal data, and other sensitive information.
  • If I plan to submit a pull request, I will wait for a Lody maintainer to explicitly agree on the scope and approach before implementation.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions