Skip to content

Commit 91b44a5

Browse files
authored
Read conversation id from the task (instead of the TaskAssignmentMessage) (#57)
1 parent 0d760e7 commit 91b44a5

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

internal/common/task_utils_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ func TestAugmentArgsForTask_IdleOnCompletePrecedence(t *testing.T) {
149149
opts: TaskAugmentOptions{},
150150
expected: []string{"agent", "run", "--idle-on-complete"},
151151
},
152+
{
153+
name: "does not forward --conversation even when AgentConversationID is set; the embedded warp CLI reads it off task metadata",
154+
task: &types.Task{
155+
AgentConfigSnapshot: &types.AmbientAgentConfig{},
156+
AgentConversationID: strPtr("abc-123"),
157+
},
158+
opts: TaskAugmentOptions{},
159+
expected: []string{"agent", "run", "--idle-on-complete"},
160+
},
152161
{
153162
name: "skips --share public when public_access is nil",
154163
task: &types.Task{

internal/types/messages.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ type TaskAssignmentMessage struct {
4141
EnvVars map[string]string `json:"env_vars,omitempty"`
4242
// AdditionalSidecars is a list of extra sidecar images to mount into the task container.
4343
AdditionalSidecars []SidecarMount `json:"additional_sidecars,omitempty"`
44-
// ConversationID is the UUID of an existing AI conversation to continue.
45-
ConversationID string `json:"conversation_id,omitempty"`
4644
}
4745

4846
// TaskClaimedMessage is sent from worker to server after successfully claiming a task
@@ -132,4 +130,5 @@ type Task struct {
132130
CreatedAt time.Time `json:"created_at"`
133131
UpdatedAt time.Time `json:"updated_at"`
134132
AgentConfigSnapshot *AmbientAgentConfig `json:"agent_config_snapshot,omitempty"`
133+
AgentConversationID *string `json:"agent_conversation_id,omitempty"`
135134
}

internal/worker/worker.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ func (w *Worker) prepareTaskParams(assignment *types.TaskAssignmentMessage) *Tas
375375
"--server-root-url",
376376
w.config.ServerRootURL,
377377
}
378-
if assignment.ConversationID != "" {
379-
baseArgs = append(baseArgs, "--conversation", assignment.ConversationID)
380-
}
381378
baseArgs = common.AugmentArgsForTask(task, baseArgs, common.TaskAugmentOptions{
382379
IdleOnComplete: w.config.IdleOnComplete,
383380
})

0 commit comments

Comments
 (0)