Skip to content

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Aug 5, 2025

this is a follow on from: #3670

this adds a task tracker tool as part of the developer extension, which is useful when sessions are heavily summarized, these will remain and help keep things on track (but are ephemeral)

this may help address things like: #3841

take a look @katzdave

@michaelneale michaelneale self-assigned this Aug 5, 2025
Copy link
Collaborator

@katzdave katzdave left a comment

Choose a reason for hiding this comment

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

Cool! Will try it out some today.


Ok(vec![Content::text(result)])
}
"clear" => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

clear_all?

let tasks = self.tasks.lock().unwrap();
let mut task_list = Vec::new();
for (task, status) in tasks.iter() {
task_list.push(format!("{} [{}]", task, status.as_str()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we filter completed tasks so this doesn't grow infinitely?

Maybe mark_task_done is a good place to do this? Remove all done tasks first, then mark the current task as done. Will keep a record then of the most recently completed task for some history but won't be too long running.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah - it was either that or I expect the agent to clear tasks, btu yes, that is a good idea to make it clear up front

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it may be important for it to keep a list of what it has done over time - until it clears them all, the more I think about it (we can limit it though). The list shoudln't ever be that big or will have other troubles

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess was thinking that having too many completed tasks isn't relevant but yeah I think knowing what you did in the past might be helpful contex.


#[derive(Debug, Clone)]
pub struct TaskTracker {
tasks: Arc<Mutex<HashMap<String, TaskStatus>>>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Priority and size might be worth considering but seems reasonable to experiment with in a followup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

size - could cap it/push back, but priority - you mean like an order?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah like order; claude has high, medium and low.


match action {
"list" => {
let tasks = self.list_tasks();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will experiment with how eager goose is to call this, but maybe we want to add some kind of mechanism to force this onto the end of every message (but not keep it in the context as a traditional message, so we're always presenting the latest state).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hrm - that is an interesting to experiment with, I found with opus/sonnet it is reasonably happy to call it, but yes, that could be good.

One thing I would like to think about @katzdave: should we tweak the prompt so it doesn't ALWAYS use this, ie for non trivial one shot things should it not always call task tracker? I worry it could slow it down eg for some recipe like things, something to think about if you have any intuition there.

Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to be a platform tool and it should be a system prompt part

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as in go into the system prompt? the list should @Kvadratni ?

Copy link
Contributor

Choose a reason for hiding this comment

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

the usage instructions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tool descriptions usually do go in there already

@michaelneale michaelneale added enhancement New feature or request rust Pull requests that update rust code status: in progress p1 Priority 1 - High (supports roadmap) performance Performance related labels Aug 5, 2025
@michaelneale michaelneale marked this pull request as ready for review August 6, 2025 02:24
@michaelneale
Copy link
Collaborator Author

@katzdave ready for another look - some tweaks/simplifying. For size - could include some cap now if you think needed?

here it is kicking in after a compaction:

image

(and in that session, I started with something simple so it didn't kick in)

@michaelneale
Copy link
Collaborator Author

I think this is better done in this location: #3902 - but should check out if fine grained is better.

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

Labels

enhancement New feature or request p1 Priority 1 - High (supports roadmap) performance Performance related rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants