fix: ACP thinking config, cron delivery dedup, HEARTBEAT_OK, QMD 1.1.6 - #1
Merged
Conversation
Hybrid search (query expansion + vector + BM25 + reranking) replaces the three separate tools (search/vector_search/deep_search) with a unified `query` tool. Tested: Japanese vague queries that returned 0 results on BM25-only now return relevant hits via auto-expansion. - Update MCP tool references in AGENTS.md, context-builder, tests - Recreate patches (RERANK_CONTEXT_SIZE 4096, createMcpServer export) - Fix serve.ts imports to use createRequire (QMD exports map changed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without isChatModel: true in the ACP session's sendMessageStream call, resolveAliasChain() does not fall back to the chat-base alias, so thinkingConfig (includeThoughts: true) is never sent to the Gemini API. This causes the API to return thinking content as regular text parts (part.thought = undefined) instead of marking them with part.thought = true, resulting in thought narration leaking into responseText and being displayed to the user. Upstream: google-gemini/gemini-cli#21411 (closed but PR #21412 unmerged) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LLMs sometimes append HEARTBEAT_OK without a preceding newline or wrap it in bold/code markers (**HEARTBEAT_OK**, `HEARTBEAT_OK`). Strip markdown decoration and match at end of any line instead of requiring a standalone line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node 25.8 enforces ESM top-level await restrictions on require(). QMD's store.js uses top-level await, so createRequire fails with ERR_REQUIRE_ASYNC_MODULE. Switch back to dynamic import() with @ts-expect-error to suppress TS module resolution errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ts-expect-error fails when TS doesn't flag the import as an error (varies by environment/TS config). @ts-ignore works in both cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e-mon
force-pushed
the
fix/acp-thinking-config
branch
from
March 12, 2026 06:42
3b3c7c4 to
fdf6cb8
Compare
Add silent: true to tasks that don't need their commands printed (install, start, stop, status, logs, setup sub-commands). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Background jobs (cron/heartbeat) previously had two delivery paths: 1. Skills posting via geminiclaw_post_message (explicit) 2. Framework sendReply posting responseText to reply target (implicit) Both targeted the same homeChannel, causing duplicate messages. This change unifies delivery: all background jobs post results via geminiclaw_post_message. The CronJob.reply field is repurposed as a delivery target hint injected into agent context, rather than driving framework-level sendReply. Removed: - buildCronReply / resolveHomeChannel (cron-scheduler.ts) - buildHeartbeatReply (heartbeat.ts) - config.heartbeat.reply / config.cron.defaultReply (schema.ts) - Legacy postToChannel path in deliverReply (reply.ts) - AgentRunEventData.reply object field Added: - AgentRunEventData.deliveryTarget (platform:channelId string) - ContextBuilder.resolveHomeChannel() helper - Cron mode context injection with delivery target instruction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused messageId/threadTs from CronJob.reply - Simplify hasReplyTarget to one-liner Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e-mon
marked this pull request as ready for review
March 12, 2026 09:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isChatModel: trueto the ACP session'ssendMessageStreamcall. Without it,resolveAliasChain()never falls back to thechat-basealias, sothinkingConfig: { includeThoughts: true }is missing from API requests. The Gemini API then returns thinking content as regular text (part.thought = undefined) instead of thought-marked parts, causing thought narration to leak intoresponseTextand be displayed to users.**HEARTBEAT_OK**,`HEARTBEAT_OK`) and end-of-line appends (...HEARTBEAT_OK) that LLMs sometimes produce.search/vector_search/deep_search) unified intoquery. Japanese vague queries that returned 0 results on BM25-only now return relevant hits via auto-expansion.sendReplywith skill-drivengeminiclaw_post_messagedelivery for background jobs. Cron jobs (patrol, daily-briefing, etc.) were posting content viageminiclaw_post_messageAND havingsendReplydeliverresponseTextto the same homeChannel, causing duplicate messages.CronJob.replyis repurposed as a delivery target hint injected into agent context. Removesconfig.heartbeat.reply,config.cron.defaultReply, and the legacypostToChannelpath indeliverReply.Context
Test plan
agent_thought_chunkemissionqmd_querytool works via MCP (replacesqmd_search/qmd_vector_search/qmd_deep_search)geminiclaw_post_message🤖 Generated with Claude Code