Fix boot timing, CLI flags, and SSH quoting (review sweep #40)#41
Fix boot timing, CLI flags, and SSH quoting (review sweep #40)#41TechNickAI wants to merge 3 commits intomainfrom
Conversation
- BOOT.md: Move conversation recovery check to Step 1 so the 1-minute window is measured from actual restart time, not after Orient finishes loading SOUL.md/USER.md/memory files - fleet-announce.md: Use --target/--message long flags for consistency with all other openclaw CLI usages in the codebase - fleet-announce.md: Wrap SSH command in single quotes so $ signs, backticks, and backslashes in messages aren't expanded by local shell Addresses bot feedback from PR #40 review sweep. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- BOOT.md: Interrupted path now runs Orient (Step 2) before sending recovery message, ensuring SOUL.md/USER.md/memory are always loaded - fleet-announce.md: Update escaping note to cover single-quote escaping (escape as '\'' when using single-quote outer SSH quoting) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81ad263c52
ℹ️ 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".
.claude/commands/fleet-announce.md
Outdated
| ssh <host> 'openclaw message send --channel <channel> --target <recipient_id> --message "<message>"' | ||
| ``` |
There was a problem hiding this comment.
Escape apostrophes before interpolating announcement text
The new ssh template wraps the entire remote command in single quotes, so an unescaped apostrophe inside <message> (for example, don't or Nick's) terminates the local quote and causes a shell parse error before the command is sent. Because fleet announcements are natural-language messages that commonly contain contractions, following this template as written will fail for valid messages.
Useful? React with 👍 / 👎.
.claude/commands/fleet-announce.md
Outdated
|
|
||
| ```bash | ||
| ssh <host> "openclaw message send --channel <channel> -t <recipient_id> -m '<message>'" | ||
| ssh <host> 'openclaw message send --channel <channel> --target <recipient_id> --message "<message>"' |
There was a problem hiding this comment.
Prevent remote expansion inside quoted message payload
Using --message "<message>" in the remote command still allows the remote shell to expand $..., ..., and $() before openclaw message send receives the text. That means announcement content containing these characters can be altered (or trigger command substitution) instead of being delivered literally, which contradicts the intent of preserving message text through SSH.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Both outer-single-quote and outer-double-quote SSH templates have edge cases for natural language messages (contractions, dollar signs, backticks). Use Python subprocess + shlex.quote() which handles all special characters correctly regardless of message content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Summary
Follow-up fixes from bot review of PR #40 (fleet-announce + BOOT.md).
-t/-mshort flags →--target/--messageto match all otheropenclaw message sendusages in the codebase$, backticks, and backslashes in announcement messages aren't expanded by the local shell before reaching SSHTest plan
--target/--messageflags match health-check.md and other usages🤖 Generated with Claude Code