diff --git a/session.go b/session.go index afb6e1f..1802be9 100644 --- a/session.go +++ b/session.go @@ -66,7 +66,7 @@ func guessSessionID(client Client, r *http.Request) *string { case ClientKilo: return cleanRef(r.Header.Get("X-KILOCODE-TASKID")) case ClientCoderAgents: - return nil // Session ID support planned in a follow-up. + return cleanRef(r.Header.Get("X-Coder-Chat-Id")) case ClientRoo: return nil // RooCode doesn't send a session ID. case ClientCursor: diff --git a/session_test.go b/session_test.go index 6ad9fc1..4807f32 100644 --- a/session_test.go +++ b/session_test.go @@ -127,7 +127,13 @@ func TestGuessSessionID(t *testing.T) { }, // Coder Agents. { - name: "coder_agents_returns_empty", + name: "coder_agents_with_chat_id", + client: ClientCoderAgents, + headers: map[string]string{"X-Coder-Chat-Id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}, + sessionID: utils.PtrTo("a1b2c3d4-e5f6-7890-abcd-ef1234567890"), + }, + { + name: "coder_agents_without_chat_id", client: ClientCoderAgents, }, // Roo.