Skip to content

feat: add hidden CODER_AGENT_IS_SUB_AGENT flag to coder agent #17783

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

DanielleMaywood
Copy link
Contributor

Closes coder/internal#620

Adds a new, hidden, flag CODER_AGENT_IS_SUB_AGENT to the coder agent command.

Adds a new, hidden, flag `CODER_AGENT_IS_SUB_AGENT` to the `coder agent`
command.
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new hidden flag, CODER_AGENT_IS_SUB_AGENT, to enable sub-agent behavior within the coder agent command.

  • Added a boolean "subAgent" field to both CLI and agent option structures.
  • Updated the CLI command to include a new hidden flag "is-sub-agent" with related documentation.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cli/agent.go Adds a new boolean flag and variable for sub-agent support in the CLI command configuration.
agent/agent.go Propagates the new sub-agent option through the agent options and uses it in agent initialization.
Comments suppressed due to low confidence (2)

cli/agent.go:56

  • [nitpick] Consider renaming the variable 'subAgent' to 'isSubAgent' to better reflect its boolean nature and align with the CLI flag naming convention.
subAgent            bool

cli/agent.go:487

  • Please add unit tests to verify that the hidden flag remains hidden in the CLI help output and functions correctly when set.
Flag:        "is-sub-agent",

@DanielleMaywood DanielleMaywood marked this pull request as ready for review May 13, 2025 09:10
@DanielleMaywood DanielleMaywood requested a review from mafredri May 13, 2025 09:11
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@DanielleMaywood DanielleMaywood merged commit 7f056da into main May 13, 2025
38 checks passed
@DanielleMaywood DanielleMaywood deleted the dm-devcontainer-is-sub-agent branch May 13, 2025 09:57
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CLI option CODER_AGENT_IS_SUB_AGENT to coder agent command.
2 participants