Skip to content

fix(claude-channel,idle): reply hints on channel events, no idle notice before the woken target starts - #72

Merged
leeguooooo merged 1 commit into
mainfrom
fix/channel-reply-and-idle-grace
Nov 6, 2026
Merged

leeguooooo merged 1 commit into
mainfrom
fix/channel-reply-and-idle-grace

Conversation

@leeguooooo

Copy link
Copy Markdown
Owner

Follow-ups from trying 0.9.14's ocs claude on a real host.

  1. Replies went through Bash. Channel events now carry reply_tool="ocs_dm" reply_to="<target>" (or reply_tool="ocs_send" reply_channel=… reply_seq=…), and the server instructions and tool descriptions ask the model to use them instead of running the Reply: line in a shell.
  2. --notify-when-idle fired immediately. Right after the wake the target was still idle (not started yet), so the notice was sent at once. send/dm --notify-when-idle now record the wake time. An idle status unchanged since the wake does not count; the notice waits for a status change, and after 30s (OCS_IDLE_WAKE_GRACE_MS) fires anyway (held, refused, or finished between polls). Standalone ocs notify-when-idle is unchanged. Protocol doc §2 updated.

Verification

  • New tests in test/idle.test.ts (3) and test/claude-channel.test.ts; the e2e test that encoded the old immediate notice now asserts the new behaviour. Mutation check: 5 guards flipped → red.
  • Real host (Claude Code 2.1.319, source build): DM + --notify-when-idle → no immediate notice; it arrived after the target finished (busy for 38s). For a question with no shell work, the target called mcp__ocs__ocs_dm (found through ToolSearch). When the task itself needs a shell (sleep 8 then reply), it still folded the reply into the same Bash command — a model choice, not blocked.

…ce before the woken target starts

- channel events carry reply_tool/reply_to (or reply_channel/reply_seq); instructions and tool
  descriptions ask the model to answer with ocs_dm/ocs_send instead of the Reply: shell line
- send/dm --notify-when-idle record the wake time; an idle status unchanged since the wake is not
  'done', the notice waits for a status change or a 30s grace (OCS_IDLE_WAKE_GRACE_MS)
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b044509c-17d6-46d8-8815-f79f1018b7f0
Commits

Reviewing files that changed from the base of the PR and between a8d66f5 and 394d259.

Files selected for processing: 10

  • CHANGELOG.md
  • docs/claude-channel.md
  • docs/wake-protocol.md
  • src/claude-channel.ts
  • src/cli.ts
  • src/idle.ts
  • src/wake.ts
  • test/claude-channel.test.ts
  • test/cli-e2e.test.ts
  • test/idle.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@leeguooooo
leeguooooo merged commit 6d21d75 into main Nov 6, 2026
7 checks passed
@leeguooooo
leeguooooo deleted the fix/channel-reply-and-idle-grace branch November 6, 2026 08:30
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.

1 participant