Skip to content

fix(headless): run direct tasks in the serve worker without a model turn - #1443

Merged
edenreich merged 1 commit into
mainfrom
fix/serve-direct-tasks
Oct 1, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/serve-direct-tasks

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

Part of #1396. Found by the desktop e2e suite against inference-gateway/desktop#374.

A one-shot infer headless "!cmd" runs the command through the tool service with no model, and so does the TUI, but the serve worker fed the same text to the agent as an ordinary prompt. A daemon client (the desktop app's bash mode) therefore got a model turn instead of the command's output.

runServeTurn now takes a lone !cmd or !!Tool(...) input off the queue and renders it as its own run: the tool call and its result, or the parse error the task failed on. A turn carrying several messages still goes to the agent untouched.

Verification

  • TestQueuedDirectCall covers the lone command, a malformed tool call, and a multi-message turn.
  • task precommit:run passes.
  • The desktop e2e bash-mode and queued-prompt scenarios pass against this build through the daemon.

A one-shot headless task starting with ! or !! runs through the tool
service with no model, but the serve worker fed the same text to the
agent as an ordinary prompt, so a daemon client could not run a shell
command directly the way the TUI and the one-shot path do.

The serve turn now takes a lone !cmd or !!Tool(...) input off the queue
and renders it as its own run, the tool call and its result, or the
parse error the task failed on. A turn of several messages still goes
to the agent untouched.
@edenreich
edenreich requested a review from a team as a code owner October 1, 2026 15:05
@edenreich
edenreich merged commit bb22764 into main Oct 1, 2026
12 checks passed
@edenreich
edenreich deleted the fix/serve-direct-tasks branch October 1, 2026 15:16
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.221.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant