GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [WIP] feat: configurable worker sticky-cache + event-delivery metric by NiteshDhanpal · Pull Request #468 · scaleapi/scale-agentex-python

Conversation

@NiteshDhanpal

@NiteshDhanpal NiteshDhanpal commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[WIP] — not ready for merge; opening for early visibility.

What

Two independent, load-test-driven changes to the Temporal worker path:

  1. **feat(temporal): expose max_cached_workflowsonAgentexWorker** The sticky workflow-cache size was hardcoded to the temporalio default (1000/worker) and not surfaced. Add a max_cached_workflowsparam (default **1000**, unchanged) and pass it intoWorker(...)`. No behaviour change for existing agents.

  2. **feat(observability): agentex.events.deliverycounter**event/sendis accepted + acked by the ACP server **before** the Temporal signal is attempted, so HTTP success does not mean the event reached a live workflow. New counter tagged withoutcome (delivered/no_live_workflow/error), recorded around send_signalinTemporalTaskService.send_event. no_live_workflow=RPCError/NOT_FOUND(task already completed or idle-timed-out). Best-effort, gated onAGENTEX_EVENT_METRICS; send_event` still raises as before.

Why

A rocket-mock-async-agent load test showed 61% sticky-cache miss / 618k forced evictions → constant workflow replay, and the only "event success" signal was the ACP server's accept log (which hides events that never reached a live workflow). These two changes make the cache tunable and give a true delivery metric.

Verify (Mimir; OTLP → _total, dots→underscores)

sum(rate(agentex_events_delivery_total{outcome="delivered"}[5m]))
  / sum(rate(agentex_events_delivery_total[5m]))            # true delivery rate
sum(rate(agentex_events_delivery_total{outcome="no_live_workflow"}[5m]))  # arrived too late

Note

Paired with agentex-agents PR (raises this agent's max_cached_workflows/activity limits) — this SDK PR should merge first, since max_cached_workflows isn't a valid AgentexWorker kwarg until then.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
stainless-app Bot and others added 4 commits July 17, 2026 17:23
@stainless-app
feat(stlc): configurable CI runner and private-production-repo suppor…
23c1b6b
…t in workflow templates
@stainless-app
codegen metadata
3c7015e
@NiteshDhanpal @claude
feat(temporal): expose max_cached_workflows on AgentexWorker
2338408
Add a max_cached_workflows parameter (default 1000, unchanged) to AgentexWorker and pass it through to the temporalio Worker. The sticky workflow-cache size was previously not configurable, so agents with many concurrent long-lived workflows (e.g. ones that park waiting for events) could not raise it above the SDK default, causing heavy sticky-cache eviction and constant workflow replay under load.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@NiteshDhanpal @claude
feat(observability): record true event-delivery outcome (agentex.even…
e95c2ca
…ts.delivery)

event/send is accepted and acked by the ACP server before the Temporal signal is attempted, so an HTTP success does not mean the event reached a live workflow. Add an agentex.events.delivery counter tagged with an outcome label (delivered / no_live_workflow / error) and record it around send_signal in TemporalTaskService.send_event. no_live_workflow (RPCError NOT_FOUND) captures events that arrived after the task completed or idle-timed-out. Recording is best-effort and gated on AGENTEX_EVENT_METRICS; behaviour is otherwise unchanged (send_event still raises).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@stainless-app
stainless-app Bot force-pushed the next branch from 0252fcc to 2b7649c Compare July 28, 2026 19:05
@stainless-app
stainless-app Bot force-pushed the next branch from bc51c52 to 761833e Compare September 18, 2026 21:47

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@NiteshDhanpal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.