Skip to content

Web/headless task execution cannot dispatch submit_task_complete #458

Description

@Anduin9527

What happened

An implementation task in the Web/headless libra code path finished its requested file change and verification, then tried to report completion with submit_task_complete. The runtime rejected the call before dispatch:

task failed · failed to classify tool 'submit_task_complete' for cancellation:
Tool not found: submit_task_complete

The agent then continued inspecting the already completed work instead of reaching the task's terminal state.

Cause

execute_task includes submit_task_complete in the task allowlist and configures it as the terminal tool. Its handler is implemented, but CodeAgentServicesBuilder::build() does not register it in the active Web/headless tool registry.

Expected behavior

submit_task_complete should be available to implementation and analysis tasks. A successful call should end the tool loop and let the task proceed through its normal completion and persistence path.

Reproduction

  1. Start libra code through the Web/headless runtime with a provider that supports tool calls.
  2. Run a small implementation task and approve the generated intent and plan.
  3. Let the agent finish the change and verification.
  4. Observe the failure when it calls submit_task_complete.

Suggested fix

  • Register SubmitTaskCompleteHandler in CodeAgentServicesBuilder::build().
  • Extend the production-registry test so submit_task_complete cannot silently disappear again.

Impact

This prevents otherwise successful tasks from converging, causes unnecessary repeated model calls, and hides the terminal task boundary from downstream consumers.

Related audit note

run_libra_vcs is also referenced by the task executor but is not present in the base Web/headless registry. That tool belongs to the ongoing Source Pool/MCP registration path and should be verified separately rather than folded into the terminal-handler fix.

Metadata

Metadata

Assignees

No one assigned

    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