fix: org installation visibility, project chat agent offline, message history#270
Merged
simple-agent-manager[bot] merged 9 commits intomainfrom Mar 9, 2026
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
Staging Deployment
Deployed commit: |
Previously, GitHub App installations were stored per-user with a UNIQUE constraint on installation_id. Only the user who installed the app got a DB record, making the installation invisible to other org members. Now: schema uses UNIQUE(userId, installationId) so each org member gets their own row. On GET /installations, the system syncs from GitHub API — discovers org installations the user is a member of but lacks a record for, and auto-creates them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ACP WebSocket 503 on newly created workspace (DNS propagation timing) - VM agent logs informational events at error level Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The rendering logic prioritized ACP items over DO messages whenever ACP had any items at all. Since ACP replay only contains the current agent session's messages (not cross-session history), switching to a conversation showed only the most recent exchange while reporting "172 msgs" in the sidebar. Fix: Show DO-persisted messages as the history base (complete history). Only switch to ACP view during active streaming (isPrompting) or when DO has no messages yet (initial provisioning). This preserves full conversation history while still showing real-time streaming updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the agent finishes processing (isPrompting goes false), the view switches from ACP streaming to DO persistent messages. But the VM agent batches messages with ~2s delay before persisting to the DO, so the agent's response disappears in the gap. This adds a 10s grace period after prompting ends, keeping the ACP view active until the DO catches up with the batched messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Follow-up messages from project chat stream correctly via ACP but agent responses are not persisted to the ProjectData DO. The ACP switchAgent flow creates a new session without a MessageReporter callback URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The grace period approach was fundamentally flawed: messages appeared during the 10s grace window then vanished when switching to the DO view (which lacks follow-up responses not persisted by MessageReporter). New approach: always show DO messages as the persistent base, then append any ACP items with timestamps newer than the latest DO message. This handles both the streaming case (responses not yet batched to DO) and the ACP persistence gap (MessageReporter not configured for ACP-created sessions). Removes the grace period state machine entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Follow-up user messages sent via ACP sendPrompt are not persisted to the DO (MessageReporter isn't configured for ACP-created sessions), so they were missing from the merged view. The timestamp comparison already prevents duplicates with DO-persisted messages from the initial task. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, follow-up messages sent via ACP skipped DO persistence entirely, relying on the VM agent's MessageReporter. But ACP-created sessions don't have MessageReporter configured, so user messages were lost when the workspace was torn down. Now user messages are always sent via DO WebSocket for persistence, plus via ACP for agent delivery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mples Switch default model from Llama 3.1 8B to Gemma 3 12B for more reliable instruction following. Add few-shot examples and anti-hallucination directive to system prompt to prevent the model from executing tasks instead of generating titles for them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
093c0b0 to
0f1565b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three bugs discovered during staging E2E testing and adds a rendering grace period for a fourth:
Org installation visibility — Only the GitHub App installer could see org installations. Changed from unique
installationIdto composite unique(userId, installationId)with on-demand org membership sync via GitHub API.Project chat "Agent offline" — The
deriveWorkspaceWsHost()function used a UUID-only regex that rejected ULID workspace IDs (e.g.,01KK1EGS8XD7MQAFVTF9ZD2BB4), preventing the ACP WebSocket connection. Updated to accept both UUID and ULID formats.Message history loss when switching conversations — The project chat always preferred ACP items over DO messages, but ACP replay only contains the current session's messages. Changed to show DO messages as the persistent base, with ACP only during active streaming.
ACP→DO handoff race condition — When the agent finishes processing, the view switches from ACP streaming to DO persistent messages. But the VM agent batches messages with ~2s delay, so the response disappeared in the gap. Added a 10s grace period after prompting ends to keep the ACP view active until the DO catches up.
Known Issues (filed as backlog tasks)
tasks/backlog/2026-03-06-acp-session-message-persistence.md)tasks/backlog/2026-03-06-project-chat-acp-503-on-new-workspace.md)tasks/backlog/2026-03-06-vm-agent-error-level-logging.md)Test plan
Agent Preflight
🤖 Generated with Claude Code