openclaw - ✅(Solved) Fix [Feature]: LINE sticker send/receive support [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#64784Fetched 2026-04-12 13:26:50
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Enable OpenClaw bots to send and receive LINE stickers, with a Skill-based catalog system for AI-driven sticker selection.

Root Cause

Enable OpenClaw bots to send and receive LINE stickers, with a Skill-based catalog system for AI-driven sticker selection.

Fix Action

Fixed

PR fix notes

PR #65270: feat(line): add LINE sticker send/receive support with Skill-based catalog

Description (problem / solution / changelog)

Summary

TL;DR

  • Adds end-to-end LINE sticker support (send + receive)
  • Introduces bundled line-sticker Skill with 14-package catalog (416 stickers) + browser-based catalog editor
  • Fixes pipeline stages that silently dropped sticker-only payloads

Feature

  • End-to-end LINE sticker send/receive via STICKER:packageId:stickerId directive (same pattern as existing MEDIA:)
  • Bundled line-sticker Skill with two-stage selection: package (language/style) → sticker (desc match)
  • Browser-based catalog editor (skills/line-sticker/tools/catalog-editor.html) for community catalog contributions without writing code

Bug Fix

  • Multiple pipeline stages (isRenderablePayload, normalizeReplyPayloadsForDelivery, blockReplyCoalescer, dispatchAcpDelivery, pi-embedded-runner) silently dropped sticker-only payloads — all fixed

Why it matters

In Japan and LINE-heavy regions across East Asia, stickers are a primary unit of emotional communication — not a decoration, but a genuine social gesture. Sending a sticker instead of text is completely normal. A bot that only replies with text breaks the conversational feel LINE users expect.

What did NOT change

Telegram, Discord, and other channel delivery paths are unchanged except for defensive sticker-only payload handling. No breaking config changes.

Change Type

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

Scope

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

Linked Issue/PR

  • Closes #64784
  • Related: upstream #50477 (matrix fix included incidentally)
  • This PR fixes a bug or regression

Root Cause (if applicable)

Pipeline assumed payloads must include text or media to be deliverable, causing sticker-only payloads to be silently dropped at every stage.

  • Root cause: isRenderablePayload, normalizeReplyPayloadsForDelivery, blockReplyCoalescer, dispatchAcpDelivery, and the pi-embedded-runner payload builder all lacked sticker awareness.
  • Missing detection / guardrail: No test coverage for sticker-only payload flow through the full pipeline.
  • Contributing context: The STICKER: directive pattern was added alongside the existing MEDIA: pattern but pipeline stages were not updated to handle it.

Regression Test Plan (if applicable)

  • Coverage level:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target tests:
    • src/auto-reply/reply/reply-directives.test.ts — STICKER: directive parsing
    • src/auto-reply/reply/block-reply-pipeline.test.ts — sticker dedupe key
    • src/auto-reply/reply/reply-delivery.test.ts — block streaming sticker delivery
    • src/auto-reply/reply/route-reply.test.ts — silent skip guard
    • src/infra/outbound/payloads.test.ts — outbound normalization
    • src/infra/outbound/deliver.test.ts — capability gating regression
    • extensions/line/src/auto-reply-delivery.test.ts — LINE delivery path
    • extensions/line/src/channel.sendPayload.test.ts — LINE send payload
    • extensions/telegram/src/bot/delivery.test.ts — Telegram sticker-only fallback
  • Scenario: sticker-only payload must pass through every pipeline stage without being silently dropped
  • Why smallest guardrail: each test covers one pipeline stage boundary
  • Existing coverage: none (new behavior)

User-visible / Behavior Changes

  • LINE bots can now reply with stickers using the line-sticker Skill
  • Incoming LINE sticker messages are recognized and the bot can reply in kind
  • Sticker replaces text when sent (LINE API limitation — one message type per send)
  • Sticker usage governed by Skill instructions and agent persona (SOUL/USER)
  • Other channels: sticker-only payloads on channels without declared sticker support now warn and skip instead of silently mis-delivering
  • Config: requires "line-sticker" in skills.allowBundled to activate the Skill
  • Browser-based catalog editor included for community sticker catalog contributions

Diagram

Before:
[AI output: "STICKER:789:10858"] -> [pipeline drops sticker-only payload] -> [no delivery]

After:
[AI output: "STICKER:789:10858"]
  -> parseReplyDirectives -> { sticker: { raw: "789:10858" } }
  -> normalizeReplyPayload -> routeReply
  -> LINE delivery -> createStickerMessage({ packageId: 789, stickerId: 10858 })
  -> LINE API -> sticker delivered ✓

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? Yes — LINE Messaging API sticker send (existing LINE API surface, no new endpoints or auth scope)
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Ubuntu Server 24.04
  • Runtime/container: Docker
  • Model/provider: Claude (claude-sonnet)
  • Integration/channel: LINE
  • Relevant config: "line-sticker" in skills.allowBundled

Steps

  1. Add "line-sticker" to skills.allowBundled in openclaw.json
  2. Start a new LINE session with /new
  3. Send a casual greeting or sticker to the LINE bot

Expected

  • Casual greeting or incoming sticker → bot replies with an appropriate sticker from the catalog

Actual

  • Working as expected on production LINE bot ✓

Evidence

  • Screenshot/recording

[Screenshot 1: User sends "おはよー" sticker → bot replies with Cony "good job" sticker] LINE1

[Screenshot 2: User sends "行方不明・やる気" sticker → bot replies with Sally "dizzy" sticker] LINE2

[Screenshot 3: User asks news summary → bot replies with text only, correctly not using a sticker] LINE3

Human Verification

  • Verified scenarios:
    • Sticker send: bot sends sticker in response to casual greeting ✓
    • Sticker receive: bot receives incoming sticker and replies with sticker ✓
    • Serious question: bot replies with text only, no sticker ✓
    • New session required after allowBundled change (skillsSnapshot behavior) ✓
  • Edge cases checked:
    • Sticker-only payload through full pipeline ✓
    • Multiple sticker blocks with distinct dedupe keys ✓
    • Unsupported channel fallback (warn + skip) ✓
    • Silent skip guard (NO_REPLY + sticker not delivered) ✓
  • What I did not verify:
    • Animated sticker rendering on all LINE client versions
    • Thai/Chinese language package selection end-to-end

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.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? Yes — requires "line-sticker" in skills.allowBundled to activate
  • Migration needed? No

Risks and Mitigations

  • Risk: Sticker capability gate (supportsStickerPayload) not yet declared by all outbound adapters
    • Mitigation: LINE's outbound adapter explicitly declares sticker support; other channels warn and skip gracefully rather than mis-delivering
  • Risk: Invalid packageId/stickerId combinations reaching LINE API
    • Mitigation: catalog JSON validated at build time; sticker IDs sourced directly from LINE's official sticker set metadata
  • Risk: AI selects contextually inappropriate sticker
    • Mitigation: Skill instructions use desc-based selection with "if no sticker fits naturally, do not send one" fallback; usage governed by agent persona
  • Risk: Matrix incidental fixes conflict with upstream changes
    • Mitigation: Both matrix commits reference upstream #50477; can be dropped cleanly if upstream fixes land first
  • Risk: skillsSnapshot caching may require /new after enabling line-sticker in config
    • Mitigation: Documented in User-visible changes; this is existing OpenClaw behavior for all skills

Review Focus

  • Pipeline changes for sticker-only payload handling (src/auto-reply/reply/, src/infra/outbound/)
  • LINE outbound adapter sticker support (extensions/line/)
  • line-sticker Skill design and catalog structure (skills/line-sticker/)

AI-assisted

  • Built with Claude (design decisions) + Codex CLI (implementation)
  • Fully tested — 158+ unit/integration tests passing
  • codex review --base origin/main run iteratively — all P1 findings resolved
  • Author understands what the code does
  • Remaining P2 findings: sticker capability gate and LINE media directive propagation — known limitations documented in Risks above

Changed files

  • extensions/line/src/auto-reply-delivery.test.ts (modified, +296/-0)
  • extensions/line/src/auto-reply-delivery.ts (modified, +60/-1)
  • extensions/line/src/bot-message-context.test.ts (modified, +79/-0)
  • extensions/line/src/bot-message-context.ts (modified, +40/-8)
  • extensions/line/src/send.test.ts (modified, +20/-0)
  • extensions/line/src/send.ts (modified, +11/-0)
  • extensions/line/src/sticker-utils.test.ts (added, +65/-0)
  • extensions/line/src/sticker-utils.ts (added, +24/-0)
  • extensions/line/src/types.ts (modified, +5/-0)
  • extensions/matrix/src/matrix/credentials.runtime.ts (added, +28/-0)
  • extensions/matrix/src/matrix/sdk/event-helpers.ts (modified, +1/-1)
  • extensions/telegram/src/bot-message-dispatch.ts (modified, +4/-1)
  • extensions/telegram/src/bot/delivery.replies.ts (modified, +5/-0)
  • extensions/telegram/src/bot/delivery.test.ts (modified, +44/-0)
  • skills/line-sticker/SKILL.md (added, +66/-0)
  • skills/line-sticker/references/package-1070.json (added, +174/-0)
  • skills/line-sticker/references/package-11537.json (added, +175/-0)
  • skills/line-sticker/references/package-11538.json (added, +175/-0)
  • skills/line-sticker/references/package-11539.json (added, +176/-0)
  • skills/line-sticker/references/package-6136.json (added, +119/-0)
  • skills/line-sticker/references/package-6325.json (added, +122/-0)
  • skills/line-sticker/references/package-6359.json (added, +117/-0)
  • skills/line-sticker/references/package-6362.json (added, +121/-0)
  • skills/line-sticker/references/package-6370.json (added, +121/-0)
  • skills/line-sticker/references/package-6632.json (added, +121/-0)
  • skills/line-sticker/references/package-789.json (added, +181/-0)
  • skills/line-sticker/references/package-8515.json (added, +129/-0)
  • skills/line-sticker/references/package-8522.json (added, +128/-0)
  • skills/line-sticker/references/package-8525.json (added, +128/-0)
  • skills/line-sticker/references/package-index.json (added, +160/-0)
  • skills/line-sticker/tools/catalog-editor.html (added, +816/-0)
  • src/agents/pi-embedded-runner/run/payloads.errors.test.ts (modified, +22/-0)
  • src/agents/pi-embedded-runner/run/payloads.ts (modified, +10/-3)
  • src/auto-reply/reply-payload.ts (modified, +4/-0)
  • src/auto-reply/reply/block-reply-coalescer.ts (modified, +6/-0)
  • src/auto-reply/reply/block-reply-pipeline.test.ts (modified, +6/-0)
  • src/auto-reply/reply/block-reply-pipeline.ts (modified, +6/-1)
  • src/auto-reply/reply/dispatch-acp-delivery.ts (modified, +7/-4)
  • src/auto-reply/reply/dispatch-acp.test.ts (modified, +1/-1)
  • src/auto-reply/reply/normalize-reply.ts (modified, +2/-2)
  • src/auto-reply/reply/reply-delivery.test.ts (modified, +63/-9)
  • src/auto-reply/reply/reply-delivery.ts (modified, +25/-9)
  • src/auto-reply/reply/reply-directives.test.ts (added, +106/-0)
  • src/auto-reply/reply/reply-directives.ts (modified, +34/-1)
  • src/auto-reply/reply/reply-payloads-base.ts (modified, +3/-1)
  • src/auto-reply/reply/reply-payloads.test.ts (modified, +35/-0)
  • src/auto-reply/reply/reply-utils.test.ts (modified, +23/-0)
  • src/auto-reply/reply/route-reply.test.ts (modified, +28/-0)
  • src/auto-reply/reply/route-reply.ts (modified, +18/-4)
  • src/auto-reply/templating.ts (modified, +7/-0)
  • src/channels/plugins/outbound.types.ts (modified, +2/-0)
  • src/infra/outbound/deliver.test.ts (modified, +88/-0)
  • src/infra/outbound/deliver.ts (modified, +40/-3)
  • src/infra/outbound/payloads.test.ts (modified, +42/-0)
  • src/infra/outbound/payloads.ts (modified, +2/-1)
  • src/plugin-sdk/reply-runtime.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Summary

Enable OpenClaw bots to send and receive LINE stickers, with a Skill-based catalog system for AI-driven sticker selection.

Problem to solve

In Japan and East Asia, LINE stickers are not decorative add-ons like emoji — they are the primary unit of emotional communication. Sending a sticker instead of text is completely normal and expected in casual conversations.

A bot that can only reply with text feels unnatural and robotic to Japanese LINE users. Additionally, when a user sends a sticker to the bot, the current implementation has no way to acknowledge or respond in kind.

Proposed solution

  1. Add ReplyPayload.sticker type to the common pipeline (channel-agnostic)
  2. Parse STICKER:packageId:stickerId directive from AI output (same pattern as the existing MEDIA: directive)
  3. Fix pipeline stages that silently drop sticker-only payloads
  4. Add LINE-specific sticker sending via the Messaging API
  5. Handle incoming sticker messages in the LINE channel
  6. Add a line-sticker Skill with a curated catalog of 14 packages (416 stickers) — catalog is defined in plain JSON, making it easy for anyone to extend

Alternatives considered

  • Emoji-only responses: insufficient — stickers carry distinct emotional weight in LINE culture that emoji cannot replicate
  • Hardcoding sticker IDs in the delivery layer: rejected in favor of a Skill-based approach so the AI selects contextually appropriate stickers
  • Cluster-based selection: prototyped but discarded in favor of a simpler package-based two-stage selection (package → sticker) which is more predictable and easier to maintain

Impact

  • Affected users: Japanese and East Asian LINE users interacting with OpenClaw bots
  • Severity: blocks natural conversation flow — text-only responses feel robotic
  • Frequency: always — every casual LINE interaction is affected
  • Consequence: reduced user engagement and unnatural bot persona

Evidence/examples

Verified working on a production LINE bot (webhook endpoint redacted).

Image

Additional information

A companion browser-based catalog editor (tools/catalog-editor.html) is included in the skill directory, allowing users and communities to build and maintain their own sticker catalogs without writing code.

Implementation PR: #65270

extent analysis

TL;DR

Implement the proposed solution to add sticker support to OpenClaw bots, including adding a ReplyPayload.sticker type and handling incoming sticker messages.

Guidance

  • Review the proposed solution steps (1-6) and implement them in the OpenClaw bot codebase to enable sticker sending and receiving.
  • Verify that the line-sticker Skill is properly configured and the curated catalog of stickers is correctly defined in JSON.
  • Test the implementation with a production LINE bot to ensure natural conversation flow and user engagement.
  • Consider using the companion browser-based catalog editor to build and maintain custom sticker catalogs.

Example

No code snippet is provided as the issue does not contain specific code examples.

Notes

The implementation may require additional testing and validation to ensure compatibility with different LINE clients and user scenarios.

Recommendation

Apply the proposed solution to enable sticker support and improve user engagement with OpenClaw bots, as it provides a more natural and culturally relevant way of communication in Japan and East Asia.

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…

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 [Feature]: LINE sticker send/receive support [1 pull requests, 1 participants]