Skip to content

Imported thread browser sessions do not add newly bound tabs to their strip #188

Open

Description

@agentrozjedemeai

A newly bound agent-browser tab is not automatically added to the thread's strip when the thread ID had to be sanitized or shortened, as for import:codex:... IDs.

In apps/server/src/lazurio/threadTabs.ts, threadOfSession removes t3- and checks whether agentBrowserSessionName(candidate) === session. The candidate is already a valid, at-most-61-character session name, so that check also succeeds for the sanitized, hashed names from agentBrowserSessionName; the code then looks up that synthetic candidate as a thread ID and never searches liveThreads() for the original ID. readBindings records the binding as seen, so the next refresh does not retry the same tab. The tab is consequently missing from the thread's strip and holder until another path explicitly holds it.

Please fall back to matching the session against live thread IDs when the direct lookup finds no thread, and cover a newly bound imported ID in threadTabs.test.ts.

This behavior is already present on old main cab18ad99be7d16dfd32a1cb1552f8ab0e9e3dc5 and remains on rebuild head 9a4a521cdd2969f2382838f7803de92a6326cb42; it is a follow-up to the rebuild review, not a new regression from v0.1.8. The paths are a static analysis; tests were not rerun.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · bot 22dde332-171b-4cd7-8380-644bdc815739
— Pablo

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions