Skip to content

Conversation

Harsh9485
Copy link
Contributor

@Harsh9485 Harsh9485 commented Aug 21, 2025

Closes #239

/claim #239

Description

video :- https://www.loom.com/share/d1d1d54d48bc45c4a48271ca9a387a88?sid=933e250d-78f8-4a7f-9745-0e908c0ee4d9

Type of Change

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

Module Information

Path: registry/coder/modules/aider
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

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

Related Issues

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, most of the module works fine, but now I’m implementing MCP configuration and task prompts with active chatting.

Screenshot 2025-08-21 202353

The --message flag disables chat mode, runs only the prompt, and then exits the program. I’m trying to find a way to keep chat mode running inside the module.

@matifali
Copy link
Member

@Harsh9485, I think we should run in chat mode using AgentAPI by default, but provide the option to use message mode and disable AgentAPI (i.e., Coder Tasks) integration if a user wants to run in that mode.

@Harsh9485
Copy link
Contributor Author

@Harsh9485, I think we should run in chat mode using AgentAPI by default, but provide the option to use message mode and disable AgentAPI (i.e., Coder Tasks) integration if a user wants to run in that mode.

So should I give the user three options:
1 Empty prompt (works fine),
2 Task prompt,
3 Run the Aider module with a task prompt (runs only once and disables AgentAPI)

@matifali
Copy link
Member

So should I give the user three options:
1 Empty prompt (works fine),
2 Task prompt,
3 Run the Aider module with a task prompt (runs only once and disables AgentAPI)

Yes @Harsh9485

@Harsh9485
Copy link
Contributor Author

@matifali, unfortunately we can’t run interactive mode with the --message flag. What should I do now?

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats. PR ready to review.

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, I have added the MCP server configuration.

@Harsh9485
Copy link
Contributor Author

@matifali @DevelopmentCats, let me know if you need any changes in the code.

@matifali
Copy link
Member

matifali commented Sep 9, 2025

Hi @Harsh9485 leta revert these changes as currently there is no clean way to dual-purpose the module. I will also ask @35C4n0r to guide you as they are refactoring the Claude Code module.

@Harsh9485
Copy link
Contributor Author

Hey @matifali and @35C4n0r, I reverted the changes, but I left your suggestion changes in place. Let me know when you've had a chance to look at it.

@Harsh9485
Copy link
Contributor Author

I'm refactoring the aider module now.

@Harsh9485
Copy link
Contributor Author

I'll refactor the MCP part shortly.

coder_mcp = <<-EOT
coder:
args:
- exp
- mcp
- server
cmd: coder
description: Report ALL tasks and statuses (in progress, done, failed) you are working on.
enabled: true
envs:
- CODER_MCP_APP_STATUS_SLUG: aider
- CODER_MCP_AI_AGENTAPI_URL: "http://localhost:3284"
name: Coder
timeout: 3000
type: stdio
developer:
display_name: Developer
enabled: true
name: developer
timeout: 300
type: builtin
EOT

@Harsh9485
Copy link
Contributor Author

hey @matifali @DevelopmentCats,
I wanted to let you know that the Aider agent doesn't support using a Task prompt with interacting mode. When we pass one, the module just runs the prompt and exits. We also can't get the agent's response because it disappears upon exit.

if [ -n "${ARG_AI_PROMPT:-}" ]; then
printf "Aider task prompt provided : $ARG_AI_PROMPT"
PROMPT="Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $ARG_AI_PROMPT"
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_MODEL --yes-always --message "$ARG_AI_PROMPT"

@Harsh9485
Copy link
Contributor Author

Hey @matifali, I commented out the code you suggested for choosing between the two agents. I think we're dropping that plan now, so I'll remove it soon.

# if [[ "${AIDER_PROMPT}" == "true" && -n "${ARG_AI_PROMPT:-}" ]]; then
# printf "Aider start only with this prompt : $ARG_AI_PROMPT"
# mkdir -p $HOME/.aider-module/
# echo aider --model $ARG_MODEL --yes-always --message "$ARG_AI_PROMPT" > $HOME/.aider-module/aider_output.txt

@Harsh9485
Copy link
Contributor Author

The Aider agent doesn't have native support for MCP configuration. Is it okay if I use third-party software? and please let me know what should I do?

@matifali
Copy link
Member

The Aider agent doesn't have native support for MCP configuration. Is it okay if I use third-party software? and please let me know what should I do?

What do you think @DevelopmentCats and @35C4n0r

@matifali matifali assigned matifali and unassigned matifali Sep 19, 2025
@DevelopmentCats
Copy link
Contributor

The Aider agent doesn't have native support for MCP configuration. Is it okay if I use third-party software? and please let me know what should I do?

What do you think @DevelopmentCats and @35C4n0r

I think that since we don't have a realistic eta on when aider might add MCP support, our best option would be to use: https://github.com/lutzleonhardt/mcpm-aider at least until it is updated on aider's end.

@Harsh9485
Copy link
Contributor Author

@DevelopmentCats, sorry, I didn’t see your message earlier. I’ve added MCPM-aider, and now I’ve found a way to add the Coder MCP server to it.

@Harsh9485
Copy link
Contributor Author

Tried adding Coder MCP server via mcpm-aider add, but env vars aren’t supported.

Screenshot 2025-10-02 131523

@Harsh9485
Copy link
Contributor Author

Hey @matifali, @DevelopmentCats, I think we should drop the idea of configuring the Coder MCP server for now. Once Aider supports MCP, I’ll implement it.
Also, we shouldn’t use the TASK prompt for interactive mode. When a user gives a TASK prompt, it’s only sent once, and when the output is completely fetched, both Aider and AgentAPI exit. Because of this, the user can’t see the output properly. I think that’s kind of a bug.

@DevelopmentCats
Copy link
Contributor

Hey @matifali, @DevelopmentCats, I think we should drop the idea of configuring the Coder MCP server for now. Once Aider supports MCP, I’ll implement it. Also, we shouldn’t use the TASK prompt for interactive mode. When a user gives a TASK prompt, it’s only sent once, and when the output is completely fetched, both Aider and AgentAPI exit. Because of this, the user can’t see the output properly. I think that’s kind of a bug.

A lot of these CLI modules have a similar issue that we have had to work around. AgentAPI now supports an -I flag so for this you would want to pass the prompt into the session with that so that way we aren't locked into a print style output.

As for the MCP Server issue I'm honestly not too sure when we would be seeing this since Development on aider seems to have slowed down exponentially in the last few months.

@Harsh9485
Copy link
Contributor Author

If any CLI module already uses the -I flag, @DevelopmentCats could you share its name? It would really help.

@DevelopmentCats
Copy link
Contributor

If any CLI module already uses the -I flag, @DevelopmentCats could you share its name? It would really help.

The copilot module that was just released uses this flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aider Module: Tasks+AgentAPI Support
3 participants