Skip to content

feat: warn when agent startup scripts fail or time out - #1129

Merged
EhabY merged 2 commits into
mainfrom
feat/startup-script-failure-warning
Oct 1, 2026
Merged

EhabY merged 2 commits into
mainfrom
feat/startup-script-failure-warning

Conversation

@EhabY

@EhabY EhabY commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1125.

When the connected agent reaches start_error or start_timeout, the extension shows a non-modal warning. Before this change, it wrote only a line to the output channel. The connection still succeeds.

  • WorkspaceMonitor checks the connected agent on every workspace update after setup. This also catches non-blocking scripts that fail after the connection is up, which the state machine never sees.
  • If the server reports per-script status, the warning names the failed scripts and their exit codes. Otherwise it shows a generic message. The timeout message says the scripts might still be running.
  • Show Logs opens the agent logs in a terminal, with each line prefixed by its script name. Open in Dashboard opens the workspace page.
  • The warning respects coder.disableNotifications, like the monitor's other notifications.

@EhabY
EhabY force-pushed the feat/startup-script-failure-warning branch 2 times, most recently from c4c4129 to 42583f8 Compare September 29, 2026 16:44
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

VSC-22

@EhabY
EhabY requested a review from jeremyruppel September 30, 2026 08:57
Show a non-modal warning when the connected agent reaches start_error or
start_timeout, whether before or after the connection. The warning names
the failed scripts and their exit codes when the server reports them.
Show Logs opens the agent logs in a terminal, and Open in Dashboard opens
the workspace page.

Closes #1125
@EhabY
EhabY force-pushed the feat/startup-script-failure-warning branch from 42583f8 to e17ed12 Compare September 30, 2026 12:51

@code-asher code-asher left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have some suggestions on usage and compatibility with a future API change but I tested and it looks good!

Edit: ah well the start_error bit should probably be added at the very least before merging.

Comment thread src/workspace/workspaceMonitor.ts
Comment thread src/workspace/workspaceMonitor.ts Outdated
Comment thread src/workspace/workspaceMonitor.ts Outdated
Comment thread src/workspace/workspaceMonitor.ts Outdated
Comment thread src/workspace/workspaceMonitor.ts
@code-asher

Copy link
Copy Markdown
Member

Ah actually did have one more suggestion, it seems to only notify you if it is starting while you connect. If you connect to an already-running workspace I saw no notification, but maybe we want one in that case as well?

List every failed or timed-out startup script, falling back to the agent
lifecycle state for servers without per-script statuses. Ignore scripts
that only left pipes open, and open one log terminal per failed script.
@EhabY
EhabY force-pushed the feat/startup-script-failure-warning branch from 3e83127 to ee41036 Compare October 1, 2026 13:43
@EhabY
EhabY merged commit e0c9fec into main Oct 1, 2026
13 checks passed
@EhabY
EhabY deleted the feat/startup-script-failure-warning branch October 1, 2026 13:50
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.

Surface non-blocking agent startup script failures to the user

2 participants