Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(frontend): /m replies paint only at turn end when the session is outside the user's default project

Open Beginner friendly
#7,542 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with web/packages/agenta-chat/src/transport/sessionLiveEvents.ts and the useSessionLivePreview call site that reads projectIdAtom. Trace how the project ID reaches connectSessionLiveEvents, then check the existing /sessions/watch and /sessions/streams/watch URL patterns. Add a unit test for sessionLiveEventsUrl; done means it includes the session’s project ID and live replies stream for non-default projects.

Written by the indexing model from the issue text.

Description

Symptom

In /m, an agent reply does not stream. The page shows nothing while the model writes, and then it shows the whole reply at once when the turn ends. The network tab shows the /invoke response streaming text deltas the whole time (for example 271 deltas over 2 seconds), so the model and the runner stream correctly.

It happens only when the session belongs to a project that is not the user's default project. A user with one project sees a normal streaming reply.

Steps to reproduce

  1. Use an account that has more than one project.
  2. Open a session in a project that is not the account's default project, and send a message that produces a long reply.
  3. The reply appears in one step at the end of the turn.

Cause

With the shared session reader on (AGENTA_SESSIONS_SHARED_READER, on by default since v0.115), the client ignores the text in the /invoke stream and renders live text from GET /api/sessions/{session_id}/events, which it opens with a native EventSource. sessionLiveEventsUrl in web/packages/agenta-chat/src/transport/sessionLiveEvents.ts builds that URL without project_id:

`${getAgentaApiUrl()}/sessions/${encodeURIComponent(sessionId)}/events?after=${Math.max(0, after)}`

An EventSource does not go through the API client that adds project_id, so the auth middleware resolves the user's default project. The endpoint then subscribes to the live channel of the wrong project and replays the wrong project's records. The other EventSource URLs (/sessions/watch, /sessions/streams/watch) already pass project_id.

Evidence from the oss preview stage, with the same browser cookie session and a session in a non-default project:

  • /events?after=0 returned 0 durable events and ready with watermark 0.
  • /events?after=0&project_id=<the session's project> returned 15 durable events and ready with watermark 25.
  • A frame published to the session's live channel reached a client that used an API key (which is bound to the right project) at once, and never reached the browser page.

The text appears at turn end because the page then reloads the records through the records/query path, which does pass the project.

Suggested fix

Pass the project to the live events URL. useSessionLivePreview already reads projectIdAtom, so it can hand projectId to connectSessionLiveEvents, and sessionLiveEventsUrl can append &project_id=.... A unit test on sessionLiveEventsUrl would pin it.

Dominant language
TypeScript
Stars
4.8k
Forks
690
Avg merge
19h 47m
Merged PRs (30d)
431

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Agenta-AI/agenta

All issues in Agenta-AI/agenta

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.