Skip to content

A lot of agent fixes - #462

Merged
frikky merged 16 commits into
Shuffle:mainfrom
satti-hari-krishna-reddy:my-fix
Sep 1, 2026
Merged

A lot of agent fixes#462
frikky merged 16 commits into
Shuffle:mainfrom
satti-hari-krishna-reddy:my-fix

Conversation

@satti-hari-krishna-reddy

Copy link
Copy Markdown
Collaborator

No description provided.

@frikky frikky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(:

Comment thread shared.go Outdated
)

var project ShuffleStorage
var agentNextLLMCallMu sync.Map // Mutex to prevent duplicate parallel agent LLM runs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sooo, how does this work, not just in multithreaded systems, but multi-server systems?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Well, it won't work on a multi server system since it's stored on ram. I replaced it with cache so it works for the same purpose.

@frikky frikky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merging

Comment thread shared.go
}

// If the execution is already FINISHED but a continuation was injected (user asked the agent to do more on top of what it already did), we need to reset the status back to EXECUTING so that HandleAiAgentExecutionStart doesn't exit with "Agent run already finished". We also persist this to cache so the guard in
lockKey := fmt.Sprintf("agent_llm_lock_%s_%s", workflowExecution.ExecutionId, originalAction.ID)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I got a feeling the lock mechanism will cause issues.

Do we have a rerun mechanism in case we get stuck in a thread?

@frikky
frikky merged commit b25f6e2 into Shuffle:main Sep 1, 2026
6 of 8 checks passed
Sign up for free to 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.

2 participants