Skip to content

fix(agent): keep the internal completion check out of channel replies - #672

Merged
edenreich merged 1 commit into
mainfrom
fix/agent-internal-completion-check
Jun 28, 2026
Merged

edenreich merged 1 commit into
mainfrom
fix/agent-internal-completion-check

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

In remote/channel mode (e.g. Telegram), the agent kept sending "The task is complete." after answering, plus replies second-guessing whether a prior task existed.

Root cause: when the agent produces a turn with no tool calls, the loop injects an internal verification message asking it to "confirm the task is complete." That message's answer is a normal assistant turn, which the channel manager streams straight to the user.

Fix

Reframe the verification message as a <system-reminder> (the marker the codebase already recognizes and hides). It now:

  • states it is an automated check, not a message from the user;
  • tells the agent to stop without replying when nothing is left to do;
  • says not to announce completion or mention the check to the user.

Autonomous/CI runs keep their "continue if work remains" behavior - only the user-facing noise is removed.

Scope: cmd/agent.go only - no config, schema, or API changes.

Verification

go build ./... · cmd + config tests pass · golangci-lint 0 issues · rebuilt the channels-manager image and confirmed the new reminder text is compiled in (old text gone).

The post-turn verification message asked the agent to "confirm the task is complete", so in remote/channel mode (e.g. Telegram) that confirmation was streamed straight to the user as "The task is complete." - along with replies second-guessing whether a prior task existed.

Reframe the check as a <system-reminder>: it states the message is an automated check (not from the user), tells the agent to stop without replying when nothing is left to do, and not to announce completion or mention the check to the user. Autonomous/CI runs still continue when work genuinely remains.
@edenreich
edenreich requested a review from a team as a code owner June 27, 2026 23:54
@edenreich
edenreich merged commit 96b166c into main Jun 28, 2026
1 check passed
@edenreich
edenreich deleted the fix/agent-internal-completion-check branch June 28, 2026 00:18
inference-gateway-releaser Bot added a commit that referenced this pull request Jun 28, 2026
## [0.125.0](v0.124.1...v0.125.0) (2026-06-28)

### 🚀 Features

* **reminders:** configurable reminders on a shared hook-point catalog ([#675](#675)) ([179cad1](179cad1)), closes [#270](#270) [#669](#669) [#270](#270) [#525](#525) [#270](#270)
* **channels:** retain inbound voice/audio recordings with bounded cleanup ([#671](#671)) ([8fd29ce](8fd29ce))
* **hooks:** run configured shell commands at agent hook points ([#676](#676)) ([990f2c0](990f2c0)), closes [#270](#270) [#675](#675) [#675](#675) [#270](#270) [#675](#675) [#675](#675) [#669](#669) [#270](#270)

### 🐛 Bug Fixes

* **agent:** keep the internal completion check out of channel replies ([#672](#672)) ([96b166c](96b166c))
* **docs:** replace em dashes with hyphens for consistency in SKILL.md and configuration-reference.md ([1c9196d](1c9196d))

### ♻️ Code Refactoring

* dead-code cleanup, Go 1.26 modernization, width-aware truncation, race testing ([#667](#667)) ([7a97f3b](7a97f3b))
* interfaces, fix context propagation, and reduce delays ([#666](#666)) ([1a93ff8](1a93ff8))

### 📚 Documentation

* **skills:** add charm v2 skills (bubbletea, lipgloss, bubbles) ([#664](#664)) ([c7242c7](c7242c7)), closes [#657](#657) [#663](#663)
* **skills:** add Go skills adapted from spf13/go-skills ([#665](#665)) ([971ac23](971ac23))
* **skills:** add go-concurrency skill ([#663](#663)) ([c77ac33](c77ac33)), closes [#657](#657)

### ✅ Tests

* relax TestSessionID_Age_Recent upper bound to tolerate slow CI ([#673](#673)) ([9cfe203](9cfe203)), closes [#671](#671)
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.125.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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