Skip to content

fix: added --type aider flag in agentapi - #811

Closed
Harsh9485 wants to merge 14 commits into
coder:mainfrom
Harsh9485:aider-enhance
Closed

fix: added --type aider flag in agentapi#811
Harsh9485 wants to merge 14 commits into
coder:mainfrom
Harsh9485:aider-enhance

Conversation

@Harsh9485

@Harsh9485Harsh9485 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Description

I added the --type flag in agentapi.

Aider does not support MCP, so we can’t set report_tasks = true

Closes: #739

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path:registry/coder/modules/aider
New version:v2.1.0
Breaking change: [ ] Yes [ ] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

#749

@Harsh9485

Copy link
Copy Markdown
ContributorAuthor

I tested it without a task prompt, and everything works as expected.
Screenshot 2026-04-25 092956
Screenshot 2026-04-25 093004

@Harsh9485

Copy link
Copy Markdown
ContributorAuthor

I also tested it with a task prompt, and it works as expected.
Screenshot 2026-04-25 095211
Screenshot 2026-04-25 095220

@Harsh9485

Copy link
Copy Markdown
ContributorAuthor

@35C4n0r, this PR has been ready for review for a while, if you'd like any changes, please let me know.

@matifali

Copy link
Copy Markdown
Member

@Harsh9485 Sorry for the late review. But we are doing a larger refactor that makes the agent API and tasks optional. See #861 for example. So we may not be able to review this for a while. If you want to refactor this to match #861, I am happy to review.

@Harsh9485

Harsh9485 commented Apr 28, 2026

Copy link
Copy Markdown
ContributorAuthor

@matifali, is the plan to refactor all the modules that use the agentAPI and tasks?

I'll refactor this PR soon.

@matifali

matifali commented Apr 28, 2026

Copy link
Copy Markdown
Member

Yes. Eventually all of them. We have strated with Claude code and will move to less popular ones later.

@Harsh9485
Harsh9485 marked this pull request as draft May 5, 2026 04:56
@Harsh9485

Copy link
Copy Markdown
ContributorAuthor

hey @matifali, I’m facing an issue while refactoring the Aider module. When I click the Aider Coder app, it says aider is not found.

However, when I open the terminal and run aider manually, it works correctly.

I updated the PR to show the current code. Once the module is working properly, I’ll open a new PR.

I think the issue may be related to the app environment or PATH, because the command works in the terminal but not through coder_app.

Template code:

locals {
aider_workdir = "/home/coder"
}
module "aider" {
count = data.coder_workspace.me.start_count
source = "C:/Projects/bounty/registry/registry/coder/modules/aider"
agent_id = coder_agent.main.id
workdir = local.aider_workdir
ai_provider = "custom"
custom_env_var_name = "OPENROUTER_API_KEY"
model = "openrouter/anthropic/claude-3-haiku"
api_key = "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"
}
resource "coder_app" "aider" {
agent_id = coder_agent.main.id
slug = "aider"
display_name = "Aider"
icon = "/icon/aider.svg"
open_in = "slim-window"
command = <<-EOT
#!/bin/bash
set -e
cd /home/coder
pwd
aider --model "${module.aider.model}"
EOT
}
Screenshot 2026-05-07 201805Screenshot 2026-05-07 201838

@DevelopmentCats

Copy link
Copy Markdown
Collaborator

hey @matifali, I’m facing an issue while refactoring the Aider module. When I click the Aider Coder app, it says aider is not found.

However, when I open the terminal and run aider manually, it works correctly.

I updated the PR to show the current code. Once the module is working properly, I’ll open a new PR.

I think the issue may be related to the app environment or PATH, because the command works in the terminal but not through coder_app.

Template code:

locals {
aider_workdir = "/home/coder"
}
module "aider" {
count = data.coder_workspace.me.start_count
source = "C:/Projects/bounty/registry/registry/coder/modules/aider"
agent_id = coder_agent.main.id
workdir = local.aider_workdir
ai_provider = "custom"
custom_env_var_name = "OPENROUTER_API_KEY"
model = "openrouter/anthropic/claude-3-haiku"
api_key = "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"
}
resource "coder_app" "aider" {
agent_id = coder_agent.main.id
slug = "aider"
display_name = "Aider"
icon = "/icon/aider.svg"
open_in = "slim-window"
command = <<-EOT
#!/bin/bash
set -e
cd /home/coder
pwd
aider --model "${module.aider.model}"
EOT
}

Screenshot 2026-05-07 201805Screenshot 2026-05-07 201838

I will take a look at this as well and see if I can resolve the issue for you.

@35C4n0r

Copy link
Copy Markdown
Collaborator

agentapi module is no longer maintained due to tasks being deprecated. Tasks Migration Guide. All the agentapi and tasks related coupling once the module is migrated.

@35C4n0r35C4n0r closed this Jun 29, 2026
Sign up for freeto 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.

aider: fix inconsistent --type flag and enable task reporting

4 participants

@Harsh9485@matifali@DevelopmentCats@35C4n0r