Skip to content

Add Claude Code channel for push-based task events#28

Open
bborn wants to merge 3 commits into
mainfrom
feat/channels-integration
Open

Add Claude Code channel for push-based task events#28
bborn wants to merge 3 commits into
mainfrom
feat/channels-integration

Conversation

@bborn
Copy link
Copy Markdown
Contributor

@bborn bborn commented Apr 11, 2026

Summary

  • Adds a Claude Code channel MCP server (taskyou-channel.ts) that pushes task completion/blocked events directly into the GM session — replacing the fragile background-agent-running-tail -f approach
  • Each GM gets its own channel, baked with that GM's {{SERVER_HOST}} / {{SERVER_HOME}} at setup time (same pattern as ty-remote)
  • Channel also exposes ty_command and ssh_command tools so the GM can run server commands through the channel instead of shelling out to ./bin/ty-remote
  • Updates GM alias to include --dangerously-load-development-channels server:taskyou (will simplify when channels leave research preview)
  • Updates CLAUDE.md instructions: "wait for channel events" replaces "launch background monitoring agent"

What changed

File Change
templates/channel/taskyou-channel.ts.tmpl New — the channel MCP server
templates/channel/package.json.tmpl New — MCP SDK dependency
templates/mcp.json.tmpl New — registers channel with Claude Code
setup.sh Renders channel files, installs deps, updates alias
templates/CLAUDE.md.tmpl Replaces monitoring section with channel-based approach
templates/settings.json.tmpl Auto-allows channel tools
.claude/commands/gm-babysit.md Removes background agent re-launch step

Prerequisites

  • bun installed locally (for the channel MCP server)
  • Claude Code v2.1.80+ (channels are in research preview)
  • claude.ai login (channels don't support API key auth yet)

Test plan

  • Run ./setup.sh local /tmp/test-project with a test config.env — verify channel files are rendered
  • Start a GM with the new alias — verify Claude Code spawns the channel (check /mcp status)
  • Execute a task and verify the <channel source="taskyou"> event arrives when the task completes
  • Test ty_command and ssh_command tools from the GM session
  • Test /gm-babysit still works as a manual fallback

🤖 Generated with Claude Code

bborn and others added 3 commits April 11, 2026 08:51
Replace the pull-based monitoring approach (background agents running
ssh tail -f, 20-minute timeouts, manual /gm-babysit polling) with a
Claude Code channel that pushes task events directly into the GM session.

The channel is an MCP server (taskyou-channel.ts) that polls the server's
notifications.jsonl over SSH and emits events as <channel source="taskyou">
tags. Each GM gets its own channel, baked with that GM's server config at
setup time. Also exposes ty_command and ssh_command tools so the GM can
run server commands through the channel instead of shelling out.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Doctor Check 7 detects missing channel files, deploys them from plugin
templates using config.env, installs bun deps, checks the shell alias
for the channels flag, and verifies CLAUDE.md has the new monitoring
section. Follows the same drift-detection pattern as the nono check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spawns the channel server, performs the MCP handshake, and verifies
the claude/channel capability, tools capability, instructions, and
both ty_command and ssh_command tools are registered.

Run: cd channel && bun run smoke-test.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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