Skip to content

Developer worker could not complete the task through work_finish #508

@netandreus

Description

@netandreus

Summary

A Developer worker completed implementation work, pushed a branch, and opened a merge request successfully, but could not complete the task through work_finish.

work_finish returned:

DEVELOPER worker not active on <Project_name>

This is here in the code: https://github.com/laurentenhoor/devclaw/blob/main/lib/tools/worker/work-finish.ts#L246

At the same time, DevClaw still showed an active developer worker slot for the same issue in project state, while task listing/status showed no active or queued issues at all.

This looks like a state reconciliation issue between:

  • worker slot registry
  • issue workflow state
  • session visibility / session tree

Environment

  • OpenClaw version: 2026.3.11
  • DevClaw version: 1.6.10
  • Workspace version: 1.6.10
  • Channel: Telegram forum topic
  • Project: <Project_name>
  • Project slug: <Project_slug>
  • Channel binding: -xxxxxxxxxx:topic:49

What happened

A Developer worker handled issue #2 and reported that it had:

  • created test.txt with content Test passed
  • committed changes
  • pushed branch feature/2-create-test-txt
  • opened MR:
    https://git.local.internal/group/project/-/merge_requests/5

However, when the worker attempted to call work_finish, it failed with:

DEVELOPER worker not active on <Project_name>

Retrying work_finish from the orchestrator session also failed with the same error.

Running health(fix=true) did not resolve the issue.


Observed inconsistent state

1. Project worker state says the developer worker is active

project_status reported:

  • developer.activeSlots: 1
  • active medior developer slot on:
  • issueId: "2"
  • recent startTime

devclaw/projects.json also contained an active developer slot with:

  • issueId: "2"
  • sessionKey: agent:main:subagent:project-slug-developer-medior-vyky

2. Task state says there are no issues at all

At the same time:

  • tasks_status returned:
  • totalHold: 0
  • totalActive: 0
  • totalQueued: 0

And:

  • task_list(stateType="all") returned:
  • totalIssues: 0

So DevClaw reported an active worker slot for issue #2, but no issue existed in any workflow state.

3. Session visibility was inconsistent

openclaw status showed that a subagent/direct session existed, consistent with the worker being alive.

But from the orchestrator session:

  • sessions_list did not expose that worker session
  • sessions_send failed with:

Session send visibility is restricted to the current session tree (tools.sessions.visibility=tree).

This suggests the worker session existed at runtime, but was no longer reachable from the current session tree.


Expected behavior

One of the following should happen:

  1. If the worker slot is active for issue #2, work_finish from that worker should succeed.
  2. If the issue is no longer valid / no longer active in workflow state, DevClaw should:
  • clear the stale worker slot automatically, or
  • report a more precise reconciliation error.
  1. health(fix=true) should detect and repair this split-brain condition.

Actual behavior

  • work_finish fails with:
  • DEVELOPER worker not active on <Project_name>
  • health(fix=true) reports no issues
  • worker slot remains marked active
  • task lists remain empty
  • orchestrator cannot reach the worker session due to session tree visibility

Likely root cause

This appears to be a split-brain / stale state reconciliation bug involving at least one of:

  • project worker slot registry (projects.json)
  • issue workflow state / labels in the tracker
  • session identity or session tree binding for the worker
  • work_finish worker ownership validation

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