Skip to content

fix: local agent-relay bootstrap and messaging (rescue of PR #708 workflow)#720

Open
kjgbot wants to merge 2 commits intomainfrom
fix/relay-local-bootstrap-messaging
Open

fix: local agent-relay bootstrap and messaging (rescue of PR #708 workflow)#720
kjgbot wants to merge 2 commits intomainfrom
fix/relay-local-bootstrap-messaging

Conversation

@kjgbot
Copy link
Copy Markdown
Contributor

@kjgbot kjgbot commented Apr 11, 2026

Summary

  • Ships the installer + messaging fixes that PR feat: add workflow for relay bootstrap and messaging fixes #708's workflow was supposed to produce but never ran
  • Adds a broker /api/history/messages endpoint so agent-relay history works in local mode without RELAY_API_KEY
  • Hardens install.sh binary verification and sender-identity resolution for agent-relay send

Why

PR #708 (merged) added a 9-step workflow to diagnose and fix local agent-relay bootstrap/messaging issues (broken launcher shim, installer gaps, history requiring RELAY_API_KEY, send sender identity). The workflow was then executed on 2026-04-10 and immediately failed at the plan-fixes step with agent 'plan-fixes-cbe6ef80' already exists, causing all 7 downstream fix/verify steps to be skipped. The trajectory (.trajectories/completed/traj_1775820542976_5e67a482.json, also committed here) captures this.

The fixes were done by hand afterward but left uncommitted on a local branch for a day. This PR rescues that work.

Changes

  • install.sh — shared verify_downloaded_executable helper with failure-reason tracking for broker + dashboard binaries
  • src/cli/commands/messaging.ts — broker history path, AGENT_RELAY_SENDER env resolution, workspace-key fallback from broker session when RELAY_API_KEY is unset
  • src/listen_api.rs + src/main.rs — new /api/history/messages route and ListenApiRequest::History variant
  • packages/sdk/src/client.tsgetMessageHistory on the SDK client
  • Testssrc/cli/commands/messaging.test.ts and src/install-script.test.ts updated
  • Trajectory — committed per CLAUDE.md rule that .trajectories/ must be tracked

Test plan

  • bun test src/cli/commands/messaging.test.ts
  • bun test src/install-script.test.ts
  • cargo test -p agent-relay-broker (listen_api history route)
  • Manual: agent-relay history in a local-mode workspace with no RELAY_API_KEY set
  • Manual: agent-relay send respects AGENT_RELAY_SENDER
  • Manual: fresh install.sh run on macOS verifies broker + dashboard binaries

🤖 Generated with Claude Code


Open with Devin

Miya and others added 2 commits April 10, 2026 13:25
Implements the fixes that PR #708's workflow was meant to produce but
failed to execute (trajectory traj_1775820542976_5e67a482 aborted at
plan-fixes with "agent already exists", skipping all 7 downstream steps).

- install.sh: harden broker/dashboard binary verification with shared
  verify_downloaded_executable helper and failure-reason tracking
- src/cli/commands/messaging.ts: add broker history path so `history`
  works without RELAY_API_KEY; resolve sender via AGENT_RELAY_SENDER;
  fall back to workspace key from broker session
- src/listen_api.rs + main.rs: add /api/history/messages endpoint and
  ListenApiRequest::History variant backing the CLI path
- packages/sdk/src/client.ts: expose getMessageHistory on the SDK client
- tests updated to cover the new paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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