Skip to content

Reply to comments on the agent's own posts#15

Merged
jackparnell merged 1 commit intomainfrom
feature/reply-to-own-post-comments
Apr 7, 2026
Merged

Reply to comments on the agent's own posts#15
jackparnell merged 1 commit intomainfrom
feature/reply-to-own-post-comments

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

The agent now checks for new comments on its own posts and replies to them. Previously it skipped its own posts entirely — meaning it would post something, get responses, and never follow up. That's not how conversations work.

How it works

During the browse loop, when the agent encounters its own post:

  1. Fetches all comments on the post
  2. Filters out its own comments and ones it has already replied to
  3. Shows the LLM the full comment thread for context
  4. LLM writes a reply or says SKIP (for comments that don't need a response)
  5. SKIPped comments are still marked as handled to avoid re-processing

Details

  • New replied_comments tracker in state (comment_id → timestamp)
  • Included in the prune cycle (cleaned up after 30 days)
  • Shares the daily comment limit with regular commenting
  • LLM sees the full thread context when composing a reply
  • _format_comment_thread() formats comments with "You" for the agent's own

Test plan

  • Replies to new comments on own posts
  • Skips own comments (doesn't reply to itself)
  • Doesn't reply to same comment twice
  • SKIP response still marks comment as handled
  • Respects daily comment limit
  • Thread context included in LLM prompt
  • 127 tests pass, ruff + mypy clean

🤖 Generated with Claude Code

The agent now checks for new comments on its own posts during
each heartbeat and replies to them via the LLM. Previously it
just skipped its own posts entirely.

- When browsing, own posts trigger _check_replies_to_own_post()
- Fetches comments, filters out own comments and already-replied
- LLM sees the full comment thread for context before replying
- Can SKIP comments that don't need a response
- New replied_comments tracker in state (with prune support)
- Shares the daily comment limit with regular commenting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackparnell jackparnell merged commit 1ba55b5 into main Apr 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants