Skip to content

Validation is bypassed: empty messages ride the reply line, --dry-run checks nothing #8

Closed

Description

@abruption

Four related gaps, all reproduced.

Empty messages get sent anyway

post_to_socket() rejects not text.strip(), but the reply line is appended before that check. Piping /dev/null reports Would post ... (64 chars) — zero body, reply line only. That still starts a turn and spends tokens on the other machine, which is exactly what SKILL.md's "don't send unprompted" is meant to prevent.

--dry-run skips every check

Length and emptiness live inside post_to_socket(), which --dry-run never calls. A 1,000,001-character message passes dry-run and fails for real. Dry-run is supposed to be the safe rehearsal.

--reply-to / CC_PEER_REPLY_HOST are silently ignored outside a session

reply_line() returns None on own_session() is None before it ever looks at the explicit host. Confirmed: with the session env var unset, reply_line('1.2.3.4') returns None. The README advertises --reply-to as "say it yourself", so cron jobs and hooks get nothing and no warning.

The half-close comment overstates what it does

post_to_socket()'s docstring says a write the session never read "is reported here". The recv(1) result is discarded and every OSError is swallowed, so nothing is reported — the real effect is a 2-second wait. Either make it mean something or say what it actually does.

Fix

  • Validate the body before appending the reply line, and run the same checks under --dry-run
  • Honour --reply-to/CC_PEER_REPLY_HOST without a session, or say why it can't
  • Correct the docstring

Verified on v0.2.0.

Activity

  1. added
    bug
    on Sep 7, 2026
  2. abruption commented on Sep 7, 2026

    @abruption
    OwnerAuthor

    Fixed in #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions