openclaw - ✅(Solved) Fix /trace command not working on Feishu channel (delivered=false) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#66034Fetched 2026-04-14 05:39:12
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

The /trace directive command is detected by the Feishu channel but not executed (delivered=false).

Root Cause

The /trace directive command is detected by the Feishu channel but not executed (delivered=false).

Fix Action

Fix / Workaround

  1. Send /trace as a standalone message in Feishu DM (no other text)
  2. Observe gateway log shows:
    • "detected system command, using plain-text dispatch"
    • "system command dispatched (delivered=false)"
  • Feishu/Lark does not support native slash-command menus (per docs)
  • The command uses plain-text dispatch but fails to deliver to the execution handler
  • This may be specific to directive-style commands vs inline shortcuts
  • Gateway log excerpt: detected system command, using plain-text dispatch followed by `system command dispatched (delivered=false)

PR fix notes

PR #66111: fix(reply): recognize /trace directives

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: bare /trace and trace-only turns were parsed but never entered shared directive handling in the normal chat reply path.
  • Why it matters: channel users, including Feishu, could issue /trace and get no final reply even though trace handling existed.
  • What changed: added hasTraceDirective to the directive gate in src/auto-reply/reply/get-reply-directives-apply.ts and added a seam regression test for an authorized Feishu /trace turn.
  • What did NOT change (scope boundary): no Feishu transport-specific behavior changed, and no other command semantics were modified.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66034
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause: applyInlineDirectiveOverrides only entered directive handling when hasAnyDirective was true, and that gate omitted hasTraceDirective.
  • Missing detection / guardrail: coverage existed for handleDirectiveOnly itself, but not for the higher-level applyInlineDirectiveOverrides seam that decides whether directive handling runs.
  • Contributing context (if known): the issue was reported on Feishu, but the bug lives in shared reply logic used before channel delivery.

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/auto-reply/reply/get-reply-directives-apply.trace.test.ts
  • Scenario the test should lock in: an authorized bare /trace message must return the directive-only reply through applyInlineDirectiveOverrides.
  • Why this is the smallest reliable guardrail: the bug was in the directive gate above handleDirectiveOnly, so testing the implementation helper alone was insufficient.
  • Existing test that already covers this (if any): src/auto-reply/reply.directive.directive-behavior.shows-current-verbose-level-verbose-has-no.test.ts covers trace behavior once directive handling is reached.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • /trace, /trace on, and /trace off now work in the shared channel reply path instead of falling through as ordinary text.

Diagram (if applicable)

Before:
[user sends "/trace"] -> [parsed as trace directive] -> [directive gate ignores trace] -> [no directive reply]

After:
[user sends "/trace"] -> [parsed as trace directive] -> [directive gate includes trace] -> [current trace level reply]

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local repo checkout
  • Model/provider: N/A
  • Integration/channel (if any): Feishu symptom, shared reply pipeline fix
  • Relevant config (redacted): text commands enabled

Steps

  1. Start from a session where text commands are authorized.
  2. Send bare /trace.
  3. Observe whether the reply pipeline returns the directive status reply.

Expected

  • Reply includes Current trace level: ....

Actual

  • No directive reply was queued because the shared directive gate skipped trace-only directives.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: ran pnpm test src/auto-reply/reply/get-reply-directives-apply.trace.test.ts src/auto-reply/reply.directive.directive-behavior.shows-current-verbose-level-verbose-has-no.test.ts and confirmed both files passed.
  • Edge cases checked: bare /trace, plus existing /trace on and /trace off behavior coverage.
  • What you did not verify: live Feishu delivery against a real channel.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: trace-only turns now enter the same directive pipeline as other inline directives, which could expose any hidden assumptions in channel-specific callers.
    • Mitigation: added a seam regression at applyInlineDirectiveOverrides and kept the code change to a single missing directive flag.

Changed files

  • src/auto-reply/reply/get-reply-directives-apply.trace.test.ts (added, +119/-0)
RAW_BUFFERClick to expand / collapse

Description

The /trace directive command is detected by the Feishu channel but not executed (delivered=false).

Environment

  • OpenClaw version: 2026.4.12
  • Channel: Feishu (DM)
  • Commands config: defaults from configuration-reference

Steps to reproduce

  1. Send /trace as a standalone message in Feishu DM (no other text)
  2. Observe gateway log shows:
    • "detected system command, using plain-text dispatch"
    • "system command dispatched (delivered=false)"

Expected behavior

/trace should toggle plugin trace output for the current session and respond with acknowledgment.

Actual behavior

  • Command is detected
  • Log shows "delivered=false"
  • No response is sent to user
  • Other commands like /status may work normally

Additional context

  • Feishu/Lark does not support native slash-command menus (per docs)
  • The command uses plain-text dispatch but fails to deliver to the execution handler
  • This may be specific to directive-style commands vs inline shortcuts
  • Gateway log excerpt: detected system command, using plain-text dispatch followed by `system command dispatched (delivered=false)

extent analysis

TL;DR

The /trace directive command is not being executed due to a delivery issue, and a potential workaround is to investigate the plain-text dispatch mechanism.

Guidance

  • Investigate the plain-text dispatch mechanism to understand why the command is not being delivered to the execution handler.
  • Verify that the delivered=false log message is specific to the /trace command or if it affects other directive-style commands.
  • Check the configuration-reference defaults for any settings related to plain-text dispatch or command execution that might be causing the issue.
  • Compare the behavior of the /trace command with other commands like /status to identify any patterns or differences.

Example

No code snippet is provided as the issue does not contain sufficient information to create a relevant example.

Notes

The issue seems to be specific to the Feishu channel and directive-style commands, and the root cause may be related to the plain-text dispatch mechanism. Further investigation is needed to determine the exact cause and solution.

Recommendation

Apply workaround: Investigate and potentially modify the plain-text dispatch mechanism to ensure that the /trace command is delivered to the execution handler, as the current configuration seems to be causing the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

/trace should toggle plugin trace output for the current session and respond with acknowledgment.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix /trace command not working on Feishu channel (delivered=false) [1 pull requests, 1 participants]