agent_ui: Fix panic when restoring an agent terminal in a remote project (#58533)

Closes FR-61

To reproduce:
- you should be on a remote project
- terminal’s working directory is set to home

Release Notes:

- Fixed a crash that could occur when restoring an agent terminal in a
remote project.
44fb295593Smit Barmase committed on 6/4/2026, 12:11:17 PM· committed by GitHubparentaf26443
1 file changedLine totals unavailable