I'd like to start an agent task non-interactively over A2A, let it finish, and then jump into the same conversation interactively from another terminal with docker-agent run --session <id>. That doesn't work today: A2A sessions are never visible to run --session.
The cause is that serve a2a and run use two different session backends:
-
|
cmd.PersistentFlags().StringVarP(&flags.sessionDB, "session-db", "s", filepath.Join(paths.GetHomeDir(), ".cagent", "session.db"), "Path to the session database") |
-
|
executor := newExecutorWrapper(adka2a.ExecutorConfig{ |
|
RunnerConfig: runner.Config{ |
|
AppName: name, |
|
Agent: adkAgent, |
|
SessionService: session.InMemoryService(), |
|
}, |
|
}) |
The two stores never see each other. So a session started via serve a2a never lands in ~/.cagent/session.db, never shows up in run --session listings, and disappears entirely the moment the serve a2a process exits.
What I'd expect
Be able to do this:
# Terminal 1 — kick off a task via A2A and let it run to completion.
docker-agent serve a2a ./agent.yaml --listen 127.0.0.1:8082 &
# Send a message with a known contextId.
curl -sS http://127.0.0.1:8082/invoke \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"message/send","params":{"message":{"role":"user","messageId":"m1","contextId":"my-task-001","parts":[{"kind":"text","text":"Investigate the failing test in pkg/foo"}]}}}'
# Wait for completion, then stop the serve process — the work is done.
# Terminal 2 — pick the conversation up interactively.
docker-agent run ./agent.yaml --session my-task-001
That second command should drop me into the same conversation, with full prior turns in context, so I can poke around interactively (ask follow-ups, tweak, etc.) without re-priming the agent.
I'd like to start an agent task non-interactively over A2A, let it finish, and then jump into the same conversation interactively from another terminal with
docker-agent run --session <id>. That doesn't work today: A2A sessions are never visible torun --session.The cause is that
serve a2aandrunuse two different session backends:docker-agent/cmd/root/run.go
Line 121 in b657530
docker-agent/pkg/a2a/server.go
Lines 86 to 92 in b657530
The two stores never see each other. So a session started via
serve a2anever lands in~/.cagent/session.db, never shows up inrun --sessionlistings, and disappears entirely the moment theserve a2aprocess exits.What I'd expect
Be able to do this:
That second command should drop me into the same conversation, with full prior turns in context, so I can poke around interactively (ask follow-ups, tweak, etc.) without re-priming the agent.