Skip to content

Commit 50a0594

Browse files
markturanskyuserclaude
authored
fix(backend): include thread_id in between-run listener events URL (#1687)
## Summary - The between-run listener (`listenBetweenRunEvents`) was constructing the runner SSE URL as `GET /events` without the required `{thread_id}` path parameter, causing 404 errors from the runner pod - Fixed by appending `sessionName` (which is the thread_id convention) to the events URL: `/events/{sessionName}` ## Root Cause The runner's SSE tap endpoint is `GET /events/{thread_id}` (`components/runners/ambient-runner/ambient_runner/endpoints/events.py:45`). Without the path parameter, FastAPI returns 404. ## Test plan - [ ] Deploy to UAT and verify runner pod logs no longer show `GET /events HTTP/1.1 404` - [ ] Verify between-run events (e.g., background task completions) are captured and displayed in the frontend - [ ] Verify existing run-initiated SSE streaming continues to work normally 🤖 Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved session event handling reliability by implementing session-specific event routing on the backend. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: user <u@example.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent d3ee37a commit 50a0594

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/backend/websocket/agui_proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ func listenBetweenRunEvents(projectName, sessionName string) {
11711171

11721172
for attempt := 0; attempt < betweenRunMaxRetries; attempt++ {
11731173
runnerURL := getRunnerEndpoint(projectName, sessionName)
1174-
eventsURL := strings.TrimSuffix(runnerURL, "/") + "/events"
1174+
eventsURL := strings.TrimSuffix(runnerURL, "/") + "/events/" + sessionName
11751175

11761176
req, err := http.NewRequest("GET", eventsURL, nil)
11771177
if err != nil {

0 commit comments

Comments
 (0)