J. Rogers, SE Ohio
Most people interact with AI by opening a browser tab, pasting a prompt, and waiting for an answer. That works fine for one-off questions, but it falls short when you want an assistant that works proactively in the background—scanning local directories, curating RSS feeds, and messaging you on your phone when something actually matters.
To solve that, I set up OpenClaw on my Arch Linux ARM64 machine (running Omarchy), connected it to OpenRouter for multi-model routing, and engineered a custom Signal bridge so I can command my agent directly from my phone without buying a second phone number.
Here is how the stack fits together, how I bypassed Signal's single-number limitations, and how I am structuring a tiered "conductor and specialist" model pipeline.
1. The Core Architecture: Local Execution Meets Model Tiering
Running an autonomous agent 24/7 as a background
systemd service changes how you think about AI costs and capabilities. Instead of paying flagship prices for every background check, pairing OpenClaw with OpenRouter lets you match the right model to the exact cognitive load of each task:- The Conductor (Claude Fable 5.2): My main chat orchestrator uses
anthropic/claude-fable-5.2. Its job is not to burn expensive tokens parsing raw XML or formatting boilerplate. Instead, it acts as an architect and reviewer—interpreting my messages, decomposing goals into strict specifications, delegating bounded tasks to sub-agents, and verifying the results. - The Execution Specialist (Claude Sonnet 5.5): When a concrete, well-bounded task needs to be executed—like drafting a newsletter issue from pre-selected articles or writing a utility script—Fable hands the job off to an isolated
anthropic/claude-sonnet-5.5sub-agent with a narrow toolset and clear output constraints. - High-Volume Triage (Fast/Budget Models): For repetitive, high-volume grunt work—such as scanning a local directory where my existing RSS scrapers drop new feed files, deduplicating headlines, and scoring relevance—lightweight models handle the heavy lifting before a frontier model ever sees the data.
By keeping raw file parsing inside isolated sub-agent sessions, my main chat context stays clean, fast, and inexpensive.
2. Getting
signal-cli Running on Arch Linux ARM64I wanted to control OpenClaw through Signal for end-to-end encryption and native mobile convenience. Setting that up on an
aarch64 Arch Linux box came with a couple of early hurdles:- Skipping the Native Binary Trap: OpenClaw's setup wizard looks for a pre-compiled GraalVM native binary of
signal-cli(which only ships forx86_64) or falls back to Homebrew. On Arch ARM64, the cleanest path is installingsignal-clifrom the AUR (yay -S signal-cli), which compiles the nativeaarch64libsignal-clientlibrary locally and runs on OpenJDK. - Activating the JVM Symlink: After installing Java 27 (
jdk-openjdk),signal-cliinitially couldn't find/usr/bin/javauntil I explicitly set the default runtime withsudo archlinux-java set java-27-openjdk. - Linking Without a Burner Number: Rather than registering a separate VoIP or prepaid SIM card, I linked
signal-clidirectly to my existing Signal account as a secondary device usingsignal-cli link -n "OpenClaw"and scanning the QR code from my phone.
3. Solving the Single-Number Signal Group Puzzle
Linking OpenClaw to my personal phone number immediately created a classic Signal quirk: one-way communication.
Outbound messages worked right away—OpenClaw could drop notifications into my Note to Self chat or post to a Signal group. However, whenever I sent a message back from my phone, OpenClaw ignored it completely.
Inspecting the raw Server-Sent Events stream (
http://localhost:8080/api/v1/events) coming out of the local signal-cli daemon revealed why:- SyncMessages vs. DataMessages: Because my phone (
sourceDevice: 1) and OpenClaw (sourceDevice: 2) share the same phone number, Signal's servers don't deliver my phone's messages tosignal-clias standard incomingdataMessagepackets. Instead, they arrive wrapped insidesyncMessage.sentMessagepackets meant for multi-device history syncing. - Self-Echo Loop Protection: Inside OpenClaw's
@openclaw/signalmonitor plugin (monitor-D55QXo9V.mjs), two back-to-back guards immediately drop those events—first rejecting any envelope wheresender.e164 === account, and second rejecting any envelope containing"syncMessage"—to prevent the bot from replying to itself in an infinite loop.
The Fix: A Group-Scoped
syncMessage ShimTo enable safe, loop-free two-way chat on a single phone number, I created a dedicated Signal group called Openclaw chat, grabbed its base64
groupId from signal-cli's JSON-RPC listGroups endpoint, backed up monitor-D55QXo9V.mjs, and applied a surgical shim:- If an incoming
syncMessage.sentMessagebelongs specifically to myOpenclaw chatgroup ID, the shim unwrapssentMessageintoenvelope.dataMessageand bypasses the self-sender block. - Every other
syncMessage—including Note to Self and all my personal chats—still hits the originalreturnguards untouched. - Because Signal's servers never echo
signal-cli's own outbound RPC replies back tosignal-cliassyncMessageevents, the group stays completely immune to infinite loops.
4. What This Unlocks Next
With OpenClaw running persistently via
systemd, bridged to Signal on my phone, and backed by OpenRouter's model roster, I now have a private command center in my pocket.My existing local tools already scrape RSS feeds and drop them into a directory on disk. Next, I am wiring up a scheduled workflow where budget models triage incoming feed files, Sonnet 5.5 drafts clean summaries and subscriber-ready newsletter editions, and Fable 5.2 pings me in Openclaw chat for a quick thumbs-up before publishing.
No comments:
Post a Comment