#22844: feat(line): add push-only deliveryMode
channel: line
size: S
Cluster:
Message Sending Hooks Enhancement
### What
Add `channels.line.deliveryMode` config option ("auto" | "push").
- `auto` (default): current behavior (reply token when possible, fallback to push)
- `push`: disable reply-token usage and always push (reduces failures due to reply token expiry / queued delays)
Also ensure push target uses raw `ctx.userId` when available to avoid LINE push 404 caused by prefixed addresses.
### Tests
- Add unit test to ensure when `replyToken` is undefined, `deliverLineAutoReply` never calls `replyMessageLine` and uses push path.
### Why
Improve reliability on LINE where reply tokens expire quickly (~1 minute) and long/queued agent work can cause reply failures.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds configurable `deliveryMode` option for LINE channel to support push-only delivery, avoiding reply token expiry issues. When set to `"push"`, the system bypasses reply tokens entirely and uses push API for all messages. The change correctly uses raw `userId` for push targets (avoiding the `line:` prefix that exists in `ctxPayload.From`), includes proper error handling for push-only mode, and adds test coverage for the new behavior.
<h3>Confidence Score: 5/5</h3>
- Safe to merge - well-implemented feature with proper defaults and test coverage
- The implementation is clean, maintains backward compatibility with `"auto"` as the default, includes comprehensive test coverage, and follows the repository's existing patterns. The logic correctly differentiates between reply token and push delivery paths.
- No files require special attention
<sub>Last reviewed commit: 1fecf20</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21482: feat(line): support rich message directives in text
by puritysb · 2026-02-20
74.8%
#18699: feat(hooks): add deliver: "auto" mode for webhook mappings
by larrylobster9735 · 2026-02-17
72.5%
#23621: fix(LINE): keep startAccount promise alive to prevent auto-restart ...
by ttakanawa · 2026-02-22
69.2%
#17327: fix: LINE mixed rich reply order is reversed
by MisterGuy420 · 2026-02-15
68.7%
#23048: feat(session): add `announceDeliver` option to suppress auto-delive...
by nszhsl · 2026-02-21
67.8%
#15864: feat: add deliverOnlyToolMessages config for clean messaging channe...
by gandalf-the-engineer · 2026-02-14
66.9%
#14274: feat: add collapseReplyPayloads to collapse multi-message replies
by Henry-Roff-AI · 2026-02-11
66.7%
#23320: fix(slack): respect replyToMode when incomingThreadTs is auto-created
by dorukardahan · 2026-02-22
66.6%
#17337: fix(delivery): keep route fields paired to channel during context m...
by Glucksberg · 2026-02-15
66.5%
#23513: fix(slack): respect replyToMode=off for inline directive reply tags
by dorukardahan · 2026-02-22
65.9%