Skip to content

docs(cron): document NO_REPLY conditional delivery - #45903

Closed
kiki830621 wants to merge 1 commit into
openclaw:mainfrom
PsychQuant:docs/no-reply-cron-delivery
Closed

kiki830621 wants to merge 1 commit into
openclaw:mainfrom
PsychQuant:docs/no-reply-cron-delivery

Conversation

@kiki830621

Copy link
Copy Markdown

Summary

  • Add NO_REPLY silent token documentation to docs/automation/cron-jobs.md
  • New bullet point in the "Announce delivery flow" section linking NO_REPLY to delivery suppression
  • New "Conditional delivery with NO_REPLY" subsection with usage instructions and CLI example

Motivation

The NO_REPLY token is implemented in delivery-dispatch.ts and documented in other areas (session compaction, group messages, typing indicators), but the cron jobs page — the primary reference for cron delivery — did not mention it. Users looking for conditional delivery (skip notification when agent has nothing to report) had no way to discover this feature from the cron docs.

Refs #45810

Test plan

  • Verify Mintlify renders the new section and anchor link correctly
  • Confirm the NO_REPLY behavior matches what delivery-dispatch.ts implements

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Mar 14, 2026
@kiki830621
kiki830621 force-pushed the docs/no-reply-cron-delivery branch from bed326b to ce4b45b Compare March 14, 2026 08:50
@greptile-apps

greptile-apps Bot commented Mar 14, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds documentation for the NO_REPLY silent delivery token to docs/automation/cron-jobs.md, covering how agents can suppress cron delivery for polling jobs that have nothing to report. The addition is well-placed and the described behavior — case-insensitive token matching, delivered: true in the run result, run log preservation — accurately reflects what delivery-dispatch.ts implements.

One factual gap to address:

  • The documentation states that NO_REPLY unconditionally skips channel delivery, but in delivery-dispatch.ts the SILENT_REPLY_TOKEN check only occurs inside finalizeTextDelivery. That path is bypassed (useDirectDelivery = true) whenever delivery.threadId is set. Jobs with thread-based delivery will therefore deliver the literal string "NO_REPLY" to the channel instead of suppressing it. The docs (both the new subsection and the new bullet in "Announce delivery flow") should note this limitation.

Confidence Score: 3/5

  • Safe to merge for the majority of users, but contains a factual inaccuracy for the thread-based delivery scenario that could mislead users into thinking NO_REPLY suppression is universal.
  • The documented behavior is correct for the common case (text-only, no thread ID). However, the omission of the thread-delivery limitation makes the documentation inaccurate for jobs configured with delivery.threadId. This is a documentation-only PR, so no runtime risk, but the inaccuracy could confuse users trying NO_REPLY with thread-targeted jobs.
  • docs/automation/cron-jobs.md — the "How it works" bullets and the "Announce delivery flow" bullet should note the thread-delivery limitation.

Comments Outside Diff (1)

  1. docs/automation/cron-jobs.md, line 253-254 (link)

    NO_REPLY suppression bypassed for thread-based delivery

    The documentation presents NO_REPLY suppression as a universal behavior, but delivery-dispatch.ts only checks for SILENT_REPLY_TOKEN inside finalizeTextDelivery, which is skipped when useDirectDelivery is true:

    const useDirectDelivery =
      params.deliveryPayloadHasStructuredContent || params.resolvedDelivery.threadId != null;

    When a cron job is configured with delivery.threadId (e.g. --thread in the CLI), the deliverViaDirect path is taken instead, which has no SILENT_REPLY_TOKEN check. In that case the literal text NO_REPLY would be delivered to the channel rather than being suppressed.

    Consider adding a note here (and in the bullet point at line 215) that this feature only applies to text-only, non-thread delivery. For example:

    > **Note:** `NO_REPLY` suppression applies only to text-only jobs without thread-based delivery
    > (`delivery.threadId` / `--thread`). Jobs configured with a thread ID use the direct delivery
    > path, which does not detect the silent token.
    
Prompt To Fix All With AI
This is a comment left during a code review.
Path: docs/automation/cron-jobs.md
Line: 253-254

Comment:
**`NO_REPLY` suppression bypassed for thread-based delivery**

The documentation presents `NO_REPLY` suppression as a universal behavior, but `delivery-dispatch.ts` only checks for `SILENT_REPLY_TOKEN` inside `finalizeTextDelivery`, which is skipped when `useDirectDelivery` is `true`:

```typescript
const useDirectDelivery =
  params.deliveryPayloadHasStructuredContent || params.resolvedDelivery.threadId != null;
```

When a cron job is configured with `delivery.threadId` (e.g. `--thread` in the CLI), the `deliverViaDirect` path is taken instead, which has no `SILENT_REPLY_TOKEN` check. In that case the literal text `NO_REPLY` would be delivered to the channel rather than being suppressed.

Consider adding a note here (and in the bullet point at line 215) that this feature only applies to text-only, non-thread delivery. For example:

```
> **Note:** `NO_REPLY` suppression applies only to text-only jobs without thread-based delivery
> (`delivery.threadId` / `--thread`). Jobs configured with a thread ID use the direct delivery
> path, which does not detect the silent token.
```

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: ce4b45b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bed326b412

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/automation/cron-jobs.md Outdated
Comment on lines +253 to +255
- The agent replies `NO_REPLY` (case-insensitive, must be the entire response text).
- `delivery-dispatch` detects the silent reply token and skips channel delivery.
- The job completes successfully (`delivered: true`) and the run log is preserved under

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify NO_REPLY behavior for direct announce deliveries

This section describes NO_REPLY handling as universally case-insensitive and always ending with delivered: true, but that is not true for all announce paths. In dispatchCronDelivery, those semantics are only guaranteed in the finalizeTextDelivery branch; announce jobs that resolve threadId/topic targets (or structured payloads) go through deliverViaDirect, where delivery success is computed from actual outbound sends and silent-token parsing is driven by isSilentReplyText (case-sensitive), so these runs can end as delivered: false and lowercase no_reply may still be sent. This will mislead users configuring topic/thread cron delivery.

Useful? React with 👍 / 👎.

The NO_REPLY silent token is supported by delivery-dispatch but was not
mentioned in the cron jobs documentation. Users looking for conditional
delivery had no way to discover it from the cron docs alone.

Add a bullet point in the announce delivery flow section and a dedicated
"Conditional delivery with NO_REPLY" subsection with usage instructions
and a CLI example.

Refs openclaw#45810
@steipete

Copy link
Copy Markdown
Contributor

Closing this as implemented after Codex review.

Current main already documents cron NO_REPLY suppression and the runtime now suppresses silent replies across the direct-delivery path that originally made this PR inaccurate/stale.

What I checked:

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review notes: reviewed against f03252aaf9cc; fix evidence: commit f03252aaf9cc.

@steipete steipete closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants