Skip to content

Research the Coder agent injection into devcontainers #17301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bartekgatzcoder opened this issue Apr 9, 2025 · 0 comments
Open

Research the Coder agent injection into devcontainers #17301

bartekgatzcoder opened this issue Apr 9, 2025 · 0 comments
Assignees

Comments

@bartekgatzcoder
Copy link
Contributor

In our current attempt to rework the support for the devcontainers we have stumbled upon a limitation related to the existing approach preventing us from seeing and forwarding all the open ports. The goal of this ticket is to perform a research of an alternative option, where Coder agents (or parts of it) are injected into devcontainers.

As a result of this ticket we need to understand:

  1. technical feasibility of the alternative approach
  2. associated cost of development (additional effort)
  3. associated risks and caveats
  4. whether the current approach and the alternative approach can live together and be toggled between upon user request

It's probably best if the results were added to the existing RFC.

Additional Background

The current implementation of detecting and forwarding ports from the devcontainers assumes we are doing this from "outside" of the devcontainer and without injecting an agent to it. This has two implications:

  • The devcontainers are lighter because no agent is injected into them
  • We can only forwards the ports which are openly declared in the devtcontainer.json file

Unfortunately this means that all the dynamically created ports within the devcontainer remain invisible to us at the moment, and we cannot forward them.

This is theoretically supported by the devcontainer standard, stating that all the forwarded ports should be declared up front. The reality, though, is that we cannot honestly expect this to happen. Even today the IDEs like VSCode can also detect all the dynamic ports and expose them through VSCode to the local machine. Those ports will not be seen in Coder UI tho.

The proper (user transparent) solution which we can take here is to inject all the devcontainers with our agent so that all the ports are detected, forwarded and exposed via Coder UI.

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

No branches or pull requests

3 participants