From d233d704092cc2d9746c8e87e9aa05537b367dad Mon Sep 17 00:00:00 2001 From: Daniel Peng Date: Fri, 6 Feb 2026 12:44:52 -0800 Subject: [PATCH] Support computer use flags --- internal/common/task_utils.go | 9 +++++++++ internal/types/messages.go | 13 +++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/internal/common/task_utils.go b/internal/common/task_utils.go index 0488624..1e6aed5 100644 --- a/internal/common/task_utils.go +++ b/internal/common/task_utils.go @@ -39,6 +39,15 @@ func AugmentArgsForTask(task *types.Task, args []string) []string { args = append(args, "--mcp", string(b)) } } + + // Pass computer use setting if explicitly configured. + if task.AgentConfigSnapshot.ComputerUseEnabled != nil { + if *task.AgentConfigSnapshot.ComputerUseEnabled { + args = append(args, "--computer-use") + } else { + args = append(args, "--no-computer-use") + } + } } if task.AgentConfigSnapshot != nil && task.AgentConfigSnapshot.EnvironmentID != nil { diff --git a/internal/types/messages.go b/internal/types/messages.go index ed7f8ce..332c93e 100644 --- a/internal/types/messages.go +++ b/internal/types/messages.go @@ -50,12 +50,13 @@ type TaskDefinition struct { // AmbientAgentConfig represents the agent configuration type AmbientAgentConfig struct { - EnvironmentID *string `json:"environment_id,omitempty"` - BasePrompt *string `json:"base_prompt,omitempty"` - ModelID *string `json:"model_id,omitempty"` - ProfileID *string `json:"profile_id,omitempty"` - SkillSpec *string `json:"skill_spec,omitempty"` - MCPServers map[string]json.RawMessage `json:"mcp_servers,omitempty"` + EnvironmentID *string `json:"environment_id,omitempty"` + BasePrompt *string `json:"base_prompt,omitempty"` + ModelID *string `json:"model_id,omitempty"` + ProfileID *string `json:"profile_id,omitempty"` + SkillSpec *string `json:"skill_spec,omitempty"` + MCPServers map[string]json.RawMessage `json:"mcp_servers,omitempty"` + ComputerUseEnabled *bool `json:"computer_use_enabled,omitempty"` } // Task represents an ambient agent job.