We are seeing an issue with the current debounce behavior around agent/session.create, and would like the platform team to consider removing or changing this mechanism.
Current behavior: when agent/session.create is called multiple times within a short time window, the platform may return the same session UUID. This can cause later agent/session.run calls to fail with:
no cached app_session token; create a new session
From a developer perspective, this behavior is difficult to handle reliably. Each session.create call means the caller expects a new, independent Agent session. This is especially important for multi-stage workflows, for example:
- Create a session for the authoring stage.
- Create a new session for the self-review stage.
- Create another new session for a fix or retry stage.
These stages may happen within one minute, but they are separate execution units from the application’s point of view. If the platform reuses the same session UUID, the caller believes a new session was created, while the internal cached app_session_token state may no longer match. The next session.run can then fail.
The impact is:
- Developers cannot clearly tell whether
session.createreturned a new session or a debounced/reused old session. - Short, multi-stage workflows become unstable.
- Applications have to add workarounds such as waiting 60-70 seconds, detecting repeated UUIDs, backing off after
no cached app_session token, and retrying. - The debounce behavior is opaque to callers and does not match the intuitive meaning of a “create session” API.
Recommendation: remove the implicit debounce behavior for Agent session creation.
Preferred behavior:
- Every
agent/session.createcall should return a new session UUID. - If the platform needs idempotency protection, the caller should provide an explicit idempotency key instead of the platform implicitly reusing sessions by time window.
- If session creation is too frequent, the platform should return a clear rate limit or quota error, rather than returning an old session that may fail on
session.run.
This would make Agent session lifecycle semantics clearer and avoid forcing applications to implement extra cooldown, retry, and UUID-guard logic just to work around implicit session reuse.