Skip to content

fix(codespaces): preserve execution across environment tools - #13

Merged
Saikrishna1876 merged 3 commits into
mainfrom
fix/codespace-environment-parity
Nov 7, 2026
Merged

Saikrishna1876 merged 3 commits into
mainfrom
fix/codespace-environment-parity

Conversation

@Saikrishna1876

@Saikrishna1876 Saikrishna1876 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Codespace threads could reuse host terminals, lose explicit terminal variables, and start fresh scheduled or webhook runs on the host. Host tools also confused MCP credential IDs with provider session IDs. Remote servers and terminal activity lacked target-aware status.

This change fixes the confirmed execution defects and adds the missing management controls:

  • Keep web and mobile terminal creation, bootstrap, and reuse on the thread's computer. Preserve shells running on other computers separately.
  • Persist the Codespace target for fresh scheduled and webhook threads. MCP-created jobs inherit their parent thread's target for the same project, with an explicit Host override.
  • Resolve host tools against the active provider session and forward explicit terminal variables without copying inherited host credentials.
  • Discover and stop checkout-owned remote servers, exclude nested Git checkouts, resolve Codespace port links, and show remote CPU/RAM and terminal subprocess status. Host drafts scan without a persisted thread ID; saved and unknown thread IDs retain server-side targeting. Discovery and Stop share the resolved target. Remote failures never fall back to host discovery or stop.
  • Clear the computer when a task switches environments. Open Codespaces settings from the command palette. Add rename, stopped-only machine resize, and confirmed rebuild controls on web and mobile.

Validation:

  • Changed-file test selection initially passed 419 cases. After fixing the five failures, all nine cases in the three affected files passed on rerun. Another focused server run passed 106 cases.
  • All 35 affected packages passed typechecks across the changed-file run and focused follow-ups. Changed React Compiler coverage passed all 22 selected cases. Final changed-file lint passed.
  • Final Codex subagent review found no remaining substantive issues. Personal CodeRabbit reviewed the original diff and the final seven-file review-fix delta with zero findings.
  • Review fixes passed all 16 regression and adjacent tests, four affected-package typechecks, and three selected React Compiler checks. Format, lint, both unused-code checks, and generated GraphQL passed. The changed-file gate first found two test-mock type errors; focused follow-up typechecks passed after correcting them.
  • Three scheduling eval cases passed dry-run construction. Live execution stopped before model calls because the local vibeproxy model-provider configuration is missing.

This remains a draft pending live client acceptance. Before/after management screenshots were captured through browser-test fixtures, not a live client. Native mobile and live Codespace acceptance remain unverified. The screenshots are retained locally; GitHub image attachment is still pending.

Greptile CLI review was attempted with the personal profile. The organization plan excludes per-use CLI reviews. The installed Greptile GitHub app reviewed the updated head fb6cc48 successfully: 54 files reviewed, zero new comments. Its three earlier findings are fixed with regression coverage and their review threads are resolved.

The documented provider, native-subagent, Git-import, and host-online limits remain unchanged.

Implemented with GPT-6.1 Sol in the Codex harness, with Codex subagents.

RetriggerView in GreptileConfidence Score: 5/5

The reviewed changes appear safe to merge; no new blocking issue was found.

Summary

This PR keeps terminals, scheduled tasks, and server controls on the selected computer.

  • Web and mobile terminals stay on the thread's selected computer.
  • Fresh scheduled runs keep their chosen host or Codespace.
  • Host tools connect through the active provider session.
  • The Servers view finds and manages servers on a thread's computer.
  • Codespaces settings let people rename, resize, or rebuild computers.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Discover servers] --> B{Thread state}
  B -->|Unsaved host draft| C[Scan host without thread ID]
  B -->|Unsaved Codespace draft| D[Do not scan host]
  B -->|Saved or unknown thread| E[Resolve target on server]
  E -->|Host| C
  E -->|Codespace| F[Scan remote checkout]
  E -->|Unavailable| G[Return disconnected result]
  F --> H[Exclude nested Git checkouts]
  C --> I[Stop uses discovery target]
  H --> I
Loading

Reviews (3) · Last reviewed commit: "fix(codespaces): scope server controls a..." · Reviewed by Greptile

@Saikrishna1876

Copy link
Copy Markdown
Owner Author

@greptileai review this PR against main. Please check Codespace execution targeting, remote process ownership, and web/mobile management controls.

@Saikrishna1876

Copy link
Copy Markdown
Owner Author

@greptileai All three findings are fixed in fb6cc48, with regression coverage. Please review the updated head.

Validation passed: 16 regression and adjacent tests, four affected-package typechecks, three selected React Compiler checks, format, lint, both unused-code checks, and generated GraphQL. Final Codex and personal CodeRabbit reviews found no remaining substantive issues.

@Saikrishna1876
Saikrishna1876 marked this pull request as ready for review November 7, 2026 01:45
@Saikrishna1876
Saikrishna1876 merged commit bf2dae7 into main Nov 7, 2026
1 check passed
@Saikrishna1876
Saikrishna1876 deleted the fix/codespace-environment-parity branch November 7, 2026 02:11
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