Make _INIT_AGENTS_MD_BUDGET configurable via cli argument and config - #32
Make _INIT_AGENTS_MD_BUDGET configurable via cli argument and config#32fboudra wants to merge 1 commit into
Conversation
Convert the hardcoded 3000 characters AGENTS.md budget into a runtime value. The --agents-md-budget cli argument and agents_md_budget (config.toml) both override the default. INIT_WRITE_PROMPT became init_write_prompt(budget) so /init and /remember respect the setting. For backward compatibility, INIT_WRITE_PROMPT constant still exists and InputContext defaults to 3000. Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
|
Thanks for the contribution, Fathi. But before adding the option, could you share the concrete use case that prompted it? I’m hesitant to add another permanent configuration knob for what may be a niche case. The existing 3,000-character value is deliberately a soft target rather than a hard limit: Since There are also a few things that doesn't make this PR mergeable:
|
|
Thanks for the feedback. In my use case, the 3k felt too small and had the need for a larger limit more often than not. While the AGENTS.md is consumed by coding agent, it requires some updates or edits done by human. I ended hacking in the source code to increase the limit to 5k (more reasonable in my use cases). In addition, most of my existing AGENTS.md are above the 3k limit. Avoid also hitting the warning message all the time. Overall, making it configurable looked to me a good compromise. |
|
Not forgetting you :) But I'd like to find a cleaner/simpler to use way to address this. |
Convert the hardcoded 3000 characters AGENTS.md budget into a runtime value. The --agents-md-budget cli argument and agents_md_budget (config.toml) both override the default. INIT_WRITE_PROMPT became init_write_prompt(budget) so /init and /remember respect the setting. For backward compatibility, INIT_WRITE_PROMPT constant still exists and InputContext defaults to 3000.