Skip to content

Commit 83df557

Browse files
revert(agent): remove CODER_AGENT_IS_SUB_AGENT cli flag (#17875)
The RFC has changed, this information will be passed through the manifest instead.
1 parent cf98268 commit 83df557

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

agent/agent.go

-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ type Options struct {
8989
ServiceBannerRefreshInterval time.Duration
9090
BlockFileTransfer bool
9191
Execer agentexec.Execer
92-
SubAgent bool
9392

9493
ExperimentalDevcontainersEnabled bool
9594
ContainerAPIOptions []agentcontainers.Option // Enable ExperimentalDevcontainersEnabled for these to be effective.
@@ -191,8 +190,6 @@ func New(options Options) Agent {
191190
metrics: newAgentMetrics(prometheusRegistry),
192191
execer: options.Execer,
193192

194-
subAgent: options.SubAgent,
195-
196193
experimentalDevcontainersEnabled: options.ExperimentalDevcontainersEnabled,
197194
containerAPIOptions: options.ContainerAPIOptions,
198195
}
@@ -275,8 +272,6 @@ type agent struct {
275272
metrics *agentMetrics
276273
execer agentexec.Execer
277274

278-
subAgent bool
279-
280275
experimentalDevcontainersEnabled bool
281276
containerAPIOptions []agentcontainers.Option
282277
containerAPI atomic.Pointer[agentcontainers.API] // Set by apiHandler.

cli/agent.go

-13
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
5454
blockFileTransfer bool
5555
agentHeaderCommand string
5656
agentHeader []string
57-
subAgent bool
5857

5958
experimentalDevcontainersEnabled bool
6059
)
@@ -362,7 +361,6 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
362361
PrometheusRegistry: prometheusRegistry,
363362
BlockFileTransfer: blockFileTransfer,
364363
Execer: execer,
365-
SubAgent: subAgent,
366364
ExperimentalDevcontainersEnabled: experimentalDevcontainersEnabled,
367365
})
368366

@@ -509,17 +507,6 @@ func (r *RootCmd) workspaceAgent() *serpent.Command {
509507
Description: "Allow the agent to automatically detect running devcontainers.",
510508
Value: serpent.BoolOf(&experimentalDevcontainersEnabled),
511509
},
512-
{
513-
Flag: "is-sub-agent",
514-
Default: "false",
515-
Env: "CODER_AGENT_IS_SUB_AGENT",
516-
Description: "Specify whether this is a sub agent or not.",
517-
Value: serpent.BoolOf(&subAgent),
518-
// As `coderd` handles the creation of sub-agents, it does not make
519-
// sense for this to be exposed. We do not want people setting an
520-
// agent as a sub-agent if it is not.
521-
Hidden: true,
522-
},
523510
}
524511

525512
return cmd

0 commit comments

Comments
 (0)