Skip to content

Bug: OpenCode errors when cancelling a task #520

Closed
@rlcurrall

Description

@rlcurrall

I attempted to share a super simple recreation here: https://opencode.ai/s/XLvTTl2w
But it seems to error.


Here's how I was able to consistently reproduce the issue

me: Create a monorepo using bun in this directory 
ai: I'll create a monorepo structure using Bun in this directory. Let me set up the basic monorepo configuration with workspaces.
ai:
    PLAN
    [ ] Initialize Bun project with package.json
    [ ] Create workspace configuration for monorepo
    [ ] Create example packages/apps structure
    [ ] Add basic scripts and configuration

... (Skipping down to the important part

ai:
    PLAN
    [v] Initialize Bun project with package.json
    [v] Create workspace configuration for monorepo
    [ ] Create example packages/apps structure
    [ ] Add basic scripts and configuration

AbortError: The operation was aborted.

me: Do not create the example packages/apps. Continue.

AI_InvalidToolArgumentsError: Invalid arguments for tool todowrite: Type validation failed: Value: {"todos": [{"content": "Initialize Bun project with package. json", "status": "completed" , "priority": "high": "Create workspace configuration for monorepo", "id": "1"}, {"content":"Create workspace configuration for monorepo","status":"completed","priority": "high", "id": "2"}, {"content": "Create example packages/apps structure", "status": "cancelled","priority": "medium", "id": "3"}, {"content": "Add basic scripts and configuration", "status": "in_progress", "priority": "medium", "id": "4"}]}.
Error message: [
{
  "received": "cancelled",
  "code": "invalid_enum_value",
  "options": [
    "pending",
    "in_progress",
    "completed"
  ]
  "path": [
    "todos",
    2,
    "status"
  ],
  "message": "Invalid enum value. Expected 'pending' | 'in_progress' | 'completed', received 'cancelled'"
}
]

It seems the agent is attempting to set the status for the task as cancelled despite that not being a valid option.

Metadata

Metadata

Assignees

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