Skip to content

work_finish tool fails when workers pass projectSlug instead of channelId #513

Description

@RuneFoghAssistant

Bug

Workers (developers, reviewers, testers) frequently get stuck unable to call work_finish because the tool schema requires channelId but role prompts and agents often pass projectSlug instead.

Root cause

The work_finish tool schema marks channelId as required:

required: ["channelId", "role", "result"]

And resolveChannelId throws if it's missing:

if (!explicitChannelId) throw new Error("channelId is required...")

However, the task message injected by buildTaskMessage includes both:

Project: godot-game | Channel: C0ANYEYFCJ3

LLMs commonly read "Project: godot-game" and call work_finish({ projectSlug: "godot-game", ... }) instead of using the channelId — particularly in longer sessions where the task message is far back in context. The tool receives channelId: undefined and throws, leaving the worker stuck in a loop trying to find an alternative way to call the tool.

Impact

  • Workers do their job (write code, review PR) but can't advance the pipeline
  • Issues stay stuck on "Doing" / "Reviewing" / "Testing" indefinitely
  • Heartbeat eventually zombie-kills and respawns, wasting tokens

Proposed fix

  1. Accept projectSlug as an alias in work_finish execute:
const channelId = resolveChannelId(toolCtx, params.channelId || params.projectSlug);
  1. Add projectSlug to the tool's JSON schema properties so the LLM knows it's valid

  2. Make channelId optional in required (or add projectSlug as an alternative required field)

  3. Default role prompt templates (devclaw/prompts/reviewer.md etc.) use projectSlug in their work_finish examples — these should be updated to use channelId to match the actual parameter name, or accept both.

Workaround

Patching ~/.openclaw/extensions/devclaw/dist/index.js locally to accept params.channelId || params.projectSlug and updating the role prompt templates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions