feat(frontend): name the stages inside a cold agent start - #6451
Conversation
A first turn in a new session showed one static line, "Starting the agent", for the whole acquire. Measured on a trivial prompt that was 24.5 seconds, which reads as a hung screen rather than a working one. #6047 asked for exactly two states ("Sandbox starting" / "Sandbox started") and #6073 delivered them, so `STARTUP_LABELS` had one label covering the entire acquire. Nothing regressed; the scope simply stopped short of the wait it was meant to explain. The runner already times the stages inside that window and logs every one: sandbox_start 0.6s prepare_workspace 0.7s probe_capabilities 1.4s create_session 19.2s <- 78% of the wait acquire_total 24.5s `create_session` is the overwhelming majority and had no representation in the UI at all. It does now, along with workspace preparation: environment_starting Starting the agent preparing_workspace Preparing the workspace (new) opening_session Opening the agent session (new) environment_ready Agent ready Both emits sit on the straight-line path of `acquireEnvironment`, in order, neither behind a branch, beside the timing marks they correspond to. Nothing is faster; the wait just stops looking like a stall. An unknown phase still maps to null and leaves the previous label standing, so the runner can add stages later without the UI needing to know them.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used all 8 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (50)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe pull request adds sandbox startup phases, route validation, dictation lifecycle controls, unified build-kit tools, persistence timeouts, subscription error states, elicitation UI changes, template error handling, revision cache refreshes, session diagnostics, and version updates. ChangesStartup phase status
Dictation lifecycle controls
Route validation
Unified build-kit tools
Data and state consistency
Elicitation and template UI
Session diagnostics and release metadata
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🔵 Low · up to A few uncommon failure and malformed-data paths can leave UI state stuck, render incorrect tool rows, or hide persistence diagnostics. The fixes are localized and should be applied before release where practical. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 58.33% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 37 files. (10 skipped: 10 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/packages/agenta-chat/src/assets/startupPhases.ts (1)
1-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep each source comment to one short line.
The new comments in these files use multiple lines. Condense each comment or move the detailed rationale to external documentation.
web/packages/agenta-chat/src/assets/startupPhases.ts#L1-L16: replace the multi-line JSDoc comment with one short line.services/runner/src/engines/sandbox_agent/environment.ts#L1029-L1030: condense the two-line stage rationale.web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts#L22-L23: condense the two-line test rationale.As per coding guidelines, comments must be at most one short line.
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Team
Run ID: c44a7a41-a002-4d33-94e6-3df7d8dbbef8
📒 Files selected for processing (3)
services/runner/src/engines/sandbox_agent/environment.tsweb/packages/agenta-chat/src/assets/startupPhases.tsweb/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
… tests acquireEnvironment now emits preparing_workspace and opening_session, but both deepEqual assertions still listed only environment_starting and environment_ready, so a normal acquire failed the runner unit job.
web/AGENTS.md sets at most one short line per comment; the three comments added here were multi-line blocks.
Railway Preview Environment
Updated at 2026-09-03T11:05:53.550Z |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@coderabbitai full review |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (3)
web/packages/agenta-entities/src/workflow/state/store.ts (1)
2950-2952: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winShorten both new comments to one line.
web/packages/agenta-entities/src/workflow/state/store.ts#L2950-L2952: replace the cache-invalidation explanation with one short line.web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx#L118-L124: replace the mount-invalidation explanation with one short line.As per coding guidelines: “Hard rule. At most ONE short line per comment.”
Source: Coding guidelines
web/storybook/stories/entity-ui/BuildKitSection.stories.tsx (1)
10-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExpose both helpers through
@agenta/entity-ui/drill-inbefore importing them here. The current path bypasses the package boundary, and the existing subpath does not export either helper.web/packages/agenta-chat/src/hooks/useVoiceComposer.ts (1)
48-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the two
dictationStopRefcomments to one short line each. The comments exceed the checked-in frontend comment rule; keep only the essential dictation ownership and lifecycle details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Team
Run ID: 985cdfcf-3122-419a-b47a-bbd1e718b069
⛔ Files ignored due to path filters (4)
api/uv.lockis excluded by!**/*.lockclients/python/uv.lockis excluded by!**/*.locksdks/python/uv.lockis excluded by!**/*.lockservices/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (50)
api/pyproject.tomlclients/python/pyproject.tomlhosting/kubernetes/helm/Chart.yamlsdks/python/pyproject.tomlservices/pyproject.tomlservices/runner/src/engines/sandbox_agent/environment.tsservices/runner/src/engines/sandbox_agent/session-continuity.tsservices/runner/tests/unit/sandbox-agent-orchestration.test.tsservices/runner/tests/unit/session-continuity.test.tsservices/runner/tests/unit/session-keepalive-engine.test.tsweb/ee/package.jsonweb/mobile/package.jsonweb/mobile/src/features/chat/Composer.tsxweb/oss/package.jsonweb/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsxweb/oss/src/components/Layout/Layout.tsxweb/oss/src/components/pages/WorkspaceProjectRedirect/index.tsxweb/oss/src/components/pages/WorkspaceRedirect/index.tsxweb/oss/src/state/project/selectors/project.tsweb/oss/src/state/project/selectors/routeContext.test.tsweb/oss/src/state/project/selectors/routeContext.tsweb/package.jsonweb/packages/agenta-api-client/package.jsonweb/packages/agenta-chat/src/assets/startupPhases.tsweb/packages/agenta-chat/src/components/ElicitationDock.tsxweb/packages/agenta-chat/src/components/VoiceInputButton.tsxweb/packages/agenta-chat/src/hooks/useElicitationStepper.tsweb/packages/agenta-chat/src/hooks/usePushToTalk.tsweb/packages/agenta-chat/src/hooks/useVoiceComposer.tsweb/packages/agenta-chat/tests/unit/assets/startupPhases.test.tsweb/packages/agenta-chat/tests/unit/components/elicitationDockSettle.test.tsxweb/packages/agenta-chat/tests/unit/components/voiceInputButtonPushToTalk.test.tsxweb/packages/agenta-chat/tests/unit/hooks/useElicitationStepper.test.tsweb/packages/agenta-chat/tests/unit/hooks/usePushToTalk.test.tsweb/packages/agenta-entities/src/project/api.tsweb/packages/agenta-entities/src/workflow/state/agentModelCandidates.tsweb/packages/agenta-entities/src/workflow/state/store.tsweb/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.tsweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsxweb/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.tsweb/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsxweb/packages/agenta-shared/src/api/persist/debug.tsweb/packages/agenta-shared/src/api/persist/idbStorage.tsweb/packages/agenta-shared/tests/unit/persistReadTimeout.test.tsweb/packages/agenta-ui/src/RichChatInput/RichChatInput.tsxweb/packages/agenta-ui/tests/unit/richChatInputDictationSend.render.test.tsxweb/storybook/stories/entity-ui/BuildKitSection.stories.tsx
💤 Files with no reviewable changes (2)
- web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
- web/oss/src/components/pages/WorkspaceRedirect/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
- services/runner/tests/unit/session-keepalive-engine.test.ts
- services/runner/tests/unit/sandbox-agent-orchestration.test.ts
- web/packages/agenta-chat/src/assets/startupPhases.ts
- web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
- services/runner/src/engines/sandbox_agent/environment.ts
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 7
🧹 Nitpick comments (3)
web/packages/agenta-entities/src/workflow/state/store.ts (1)
2950-2952: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winShorten both new comments to one line.
web/packages/agenta-entities/src/workflow/state/store.ts#L2950-L2952: replace the cache-invalidation explanation with one short line.web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx#L118-L124: replace the mount-invalidation explanation with one short line.As per coding guidelines: “Hard rule. At most ONE short line per comment.”
Source: Coding guidelines
web/storybook/stories/entity-ui/BuildKitSection.stories.tsx (1)
10-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExpose both helpers through
@agenta/entity-ui/drill-inbefore importing them here. The current path bypasses the package boundary, and the existing subpath does not export either helper.web/packages/agenta-chat/src/hooks/useVoiceComposer.ts (1)
48-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the two
dictationStopRefcomments to one short line each. The comments exceed the checked-in frontend comment rule; keep only the essential dictation ownership and lifecycle details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Team
Run ID: 985cdfcf-3122-419a-b47a-bbd1e718b069
⛔ Files ignored due to path filters (4)
api/uv.lockis excluded by!**/*.lockclients/python/uv.lockis excluded by!**/*.locksdks/python/uv.lockis excluded by!**/*.lockservices/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (50)
api/pyproject.tomlclients/python/pyproject.tomlhosting/kubernetes/helm/Chart.yamlsdks/python/pyproject.tomlservices/pyproject.tomlservices/runner/src/engines/sandbox_agent/environment.tsservices/runner/src/engines/sandbox_agent/session-continuity.tsservices/runner/tests/unit/sandbox-agent-orchestration.test.tsservices/runner/tests/unit/session-continuity.test.tsservices/runner/tests/unit/session-keepalive-engine.test.tsweb/ee/package.jsonweb/mobile/package.jsonweb/mobile/src/features/chat/Composer.tsxweb/oss/package.jsonweb/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsxweb/oss/src/components/Layout/Layout.tsxweb/oss/src/components/pages/WorkspaceProjectRedirect/index.tsxweb/oss/src/components/pages/WorkspaceRedirect/index.tsxweb/oss/src/state/project/selectors/project.tsweb/oss/src/state/project/selectors/routeContext.test.tsweb/oss/src/state/project/selectors/routeContext.tsweb/package.jsonweb/packages/agenta-api-client/package.jsonweb/packages/agenta-chat/src/assets/startupPhases.tsweb/packages/agenta-chat/src/components/ElicitationDock.tsxweb/packages/agenta-chat/src/components/VoiceInputButton.tsxweb/packages/agenta-chat/src/hooks/useElicitationStepper.tsweb/packages/agenta-chat/src/hooks/usePushToTalk.tsweb/packages/agenta-chat/src/hooks/useVoiceComposer.tsweb/packages/agenta-chat/tests/unit/assets/startupPhases.test.tsweb/packages/agenta-chat/tests/unit/components/elicitationDockSettle.test.tsxweb/packages/agenta-chat/tests/unit/components/voiceInputButtonPushToTalk.test.tsxweb/packages/agenta-chat/tests/unit/hooks/useElicitationStepper.test.tsweb/packages/agenta-chat/tests/unit/hooks/usePushToTalk.test.tsweb/packages/agenta-entities/src/project/api.tsweb/packages/agenta-entities/src/workflow/state/agentModelCandidates.tsweb/packages/agenta-entities/src/workflow/state/store.tsweb/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.tsweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsxweb/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsxweb/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.tsweb/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsxweb/packages/agenta-shared/src/api/persist/debug.tsweb/packages/agenta-shared/src/api/persist/idbStorage.tsweb/packages/agenta-shared/tests/unit/persistReadTimeout.test.tsweb/packages/agenta-ui/src/RichChatInput/RichChatInput.tsxweb/packages/agenta-ui/tests/unit/richChatInputDictationSend.render.test.tsxweb/storybook/stories/entity-ui/BuildKitSection.stories.tsx
💤 Files with no reviewable changes (2)
- web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
- web/oss/src/components/pages/WorkspaceRedirect/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
- services/runner/tests/unit/session-keepalive-engine.test.ts
- services/runner/tests/unit/sandbox-agent-orchestration.test.ts
- web/packages/agenta-chat/src/assets/startupPhases.ts
- web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
- services/runner/src/engines/sandbox_agent/environment.ts
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
🛑 Comments failed to post (7)
web/packages/agenta-chat/src/hooks/useElicitationStepper.ts (1)
210-214: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep new code comments to one short line. Shorten both added comments or move their detail to documentation. As per coding guidelines, “At most ONE short line per comment.”
web/packages/agenta-chat/src/hooks/useElicitationStepper.ts#L210-L214: Replace the multi-lineisMultiStepJSDoc with one short line.web/packages/agenta-chat/src/components/ElicitationDock.tsx#L8-L12: Replace the multi-line layout contract comment with one short line.📍 Affects 2 files
web/packages/agenta-chat/src/hooks/useElicitationStepper.ts#L210-L214(this comment)web/packages/agenta-chat/src/components/ElicitationDock.tsx#L8-L12Source: Coding guidelines
web/packages/agenta-entities/src/project/api.ts (1)
24-25: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Validate each
ProjectsResponsewithsafeParseWithLogging; array-only validation accepts malformed records. As per coding guidelines, keep zod validation at the boundary.Source: Coding guidelines
web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts (1)
72-72: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,150p' web/packages/agenta-entities/src/workflow/state/agentModelCandidates.tsRepository: Agenta-AI/agenta
Length of output: 5676
🏁 Script executed:
sed -n '140,280p' web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts printf '\n--- subscription query ---\n' sed -n '1,220p' web/packages/agenta-entities/src/workflow/state/subscriptionStatus.ts printf '\n--- query API definitions ---\n' rg -n -A35 -B10 'fetchSubscriptionStatus|subscriptionStatusQueryAtomFamily' web/packages/agenta-entities/src/workflowRepository: Agenta-AI/agenta
Length of output: 47540
Track subscription failure separately from
subscriptionError; a falsy rejection makes line 72 return"loading"for the failed request.web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx (1)
139-142: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,210p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx printf '\n--- related uses/tests ---\n' rg -n --glob '*.{ts,tsx}' 'BUILD_KIT_TOOL_COPY|BUILD_KIT_EMBED_COPY|buildKitDescriptor|humanizeKey' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplateRepository: Agenta-AI/agenta
Length of output: 8047
🤖 get_repo_knowledge executed:
get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventions /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learningsLength of output: 43014
Guard both descriptor maps against inherited keys.
"__proto__"and"constructor"can supply inherited values, sobuildKitDescriptormay emit rows with invalidnameordescription; use own-property checks or null-prototype maps and test both keys.📍 Affects 1 file
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx#L139-L142(this comment)web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx#L152-L158web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx (1)
158-159: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash set -e file='web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx' sed -n '1,230p' "$file" printf '\n--- related key usage and tests ---\n' rg -n --glob '*.{ts,tsx}' 'embed-tool-|embed-skill-|embeddedOverlayTools|embeddedOverlaySkills|embedRow' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplateRepository: Agenta-AI/agenta
Length of output: 9706
🤖 get_repo_knowledge executed:
get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learnings /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventionsLength of output: 17692
🏁 Script executed:
#!/bin/bash set -e printf '%s\n' '--- BuildKitSection and key consumer ---' sed -n '1,260p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx printf '%s\n' '--- staticEmbedSlug and related descriptor contracts ---' sed -n '1,240p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.ts printf '%s\n' '--- relevant tests/package metadata ---' rg -n --glob '*.{ts,tsx,json}' 'BuildKitSection|useBuildKit|staticEmbedSlug|BuildKitTool|`@ag`\.embed' web/packages/agenta-entity-ui web/packages/agenta-entities | head -160Repository: Agenta-AI/agenta
Length of output: 9255
🏁 Script executed:
#!/bin/bash set -e printf '%s\n' '--- itemDescriptors candidates ---' fd -t f -i 'itemDescriptors' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate printf '%s\n' '--- resolved import and staticEmbedSlug ---' rg -n -C 10 'function staticEmbedSlug|const staticEmbedSlug|export .*staticEmbedSlug' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate printf '%s\n' '--- overlay shape declarations ---' rg -n -C 8 'workflowAgentTemplateOverlayAtomFamily|interface .*Overlay|type .*Overlay|tools.*skills|skills.*tools' web/packages/agenta-entities web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplateRepository: Agenta-AI/agenta
Length of output: 50372
Prefix embedded-row keys by kind.
embedRowusesstaticEmbedSlug(entry)for both arrays, whileBuildKitSectionrenders sibling keys from that value; a shared slug duplicates a React key and can mis-reconcile rows after updates. Add a duplicate-slug test.web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx (1)
42-44: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Reduce these comments to one short line each.
These comment blocks exceed the repository limit. As per coding guidelines, “At most ONE short line per comment.”
Also applies to: 53-55, 61-67
Source: Coding guidelines
web/packages/agenta-shared/src/api/persist/debug.ts (1)
48-48: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add a
timeoutcase. Debug mode otherwise omits this diagnostic.
|
Follow-up to #6047 / #6073.
Context
A first turn in a new session shows one static line,
Starting the agent, for the whole acquire. Measured on a trivial prompt that was 24.5 seconds, which reads as a hung screen rather than a working one.Nothing regressed. #6047 asked for exactly two states ("Display 'Sandbox starting'… Display 'Sandbox started'"), #6073 delivered them, and
STARTUP_LABELShas had one label covering the entire acquire ever since. The scope simply stopped short of the wait it was meant to explain.Meanwhile the runner already times every stage inside that window and logs each one:
create_sessionis the overwhelming majority of a cold start and had no representation in the UI at all.Changes
Two new phases, emitted beside the timing marks they correspond to:
environment_startingpreparing_workspaceprepare_workspace(new)opening_sessionprobe_capabilities+create_session(new)environment_readyBoth emits sit on the straight-line path of
acquireEnvironment, in order, neither behind a branch — verified by walking each emit's enclosing block.An unknown phase still maps to
nulland leaves the previous label standing, so the runner can add stages later without the UI needing to know them.Nothing is faster. The wait just stops looking like a stall.
Tests
@agenta/chat: 567 tests pass.tsc --noEmitclean on the chat package and the runner. Prettier clean on all three files.Not verified end to end in a browser, and I would rather say so than imply otherwise. Two local-environment blockers got in the way, neither related to this change:
http://localhost/services/agent/v0), so every invoke goes to port 80 and fails before the runner is reached.I confirmed the runner does cold-start and emit the stage timings (
probe_capabilities 2308ms,create_session 7479ms,acquire_total 12575msin the logs), but could not drive a turn through to the UI on either project.What to QA