Skip to content

feat(cloud-agents): add no-repo mode, fix session init race, enable follow-ups after cloud run#1293

Closed
tatoalo wants to merge 1 commit intomainfrom
ph-ai/feat/cloud-agents/no-repo-flow-and-followup-relay
Closed

feat(cloud-agents): add no-repo mode, fix session init race, enable follow-ups after cloud run#1293
tatoalo wants to merge 1 commit intomainfrom
ph-ai/feat/cloud-agents/no-repo-flow-and-followup-relay

Conversation

@tatoalo
Copy link
Contributor

@tatoalo tatoalo commented Mar 18, 2026

Problem

Three issues with cloud task follow-ups in the desktop app:

  1. Race condition: SSE connection and autoInitializeSession() can both call
    initializeSession() concurrently, creating duplicate sessions and sending the
    initial prompt twice (duplicate Slack messages).
  2. Follow-up replies not delivered: after a follow-up prompt completes, the
    agent response was not being relayed back to Slack.
  3. Chat input disabled: PR feat: Add multi-agent command center grid view #1212 re-introduced readOnlyMessage and changed
    isRunning to be false when cloud run is terminal, blocking the editor after
    task completion.

Changes

  • Add initializationPromise lock to prevent concurrent session creation, with
    pendingEvents buffer that replays SSE events after the session attaches.
  • After end_turn on follow-ups and resumes, call relayAgentResponse() to post
    the agent's reply to Slack. Return assistant_message in the prompt response for
    callers that need it synchronously.
  • Add currentTurnMessages tracking in SessionLogWriter with
    getFullAgentResponse() and resetTurnMessages() for accurate per-turn message
    extraction.
  • Add "No Repository Mode" system prompt for cloud tasks without a connected repo.
  • Remove readOnlyMessage from useSessionViewState, SessionView,
    TaskLogsPanel, and CommandCenterSessionView. Restore isRunning = true for
    cloud tasks so the editor stays enabled after completion.
  • Improve sandbox restore messaging to be more user-friendly.

@tatoalo tatoalo closed this Mar 18, 2026
@tatoalo tatoalo deleted the ph-ai/feat/cloud-agents/no-repo-flow-and-followup-relay branch March 18, 2026 17:47
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