Connect sessions and agent 2.0

Connect sessions and agent 2.0

Where a diagnostic session stands, how the agent stays reliable, and how administrators keep an eye on it.

This article covers TR Connect 2.0’s session phases, the Connect agent 2.0, and the Connect Health page. For the whole workflow — requesting access, the customer’s approval and running the agent — start with TicketResolve Connect.

Session phases

Access (requested, approved, declined, revoked, expired) is still decided only by the customer and the clock. The phase adds where collection stands, and is shown to both your team and the customer:

PhaseMeaning
CreatedThe link exists; the customer hasn’t opened it
Awaiting customer authorizationThe customer opened the link and hasn’t decided
AuthorizedAccess granted; nothing has been asked of the agent yet
ConnectingTasks are waiting and the customer’s agent hasn’t connected (or isn’t reachable)
Collecting evidenceTasks are running, or evidence is coming in
ProcessingEvidence arrived and is being checked and correlated
Completed / Partially completed / FailedSet when someone clicks Finish collection, from what actually came back
Expired / Revoked / Declined / CancelledAccess ended before or without collection

A phase never widens what the customer allowed: every task still passes the same scope check.

Finishing collection

Finish collection on the session ends access, cancels anything still waiting, deletes any read-only keys the customer added, and records the outcome. The outcome is Completed when every task succeeded, Partially completed when some failed or were cancelled, and Failed when nothing came back. The investigation’s audit trail records it.

Who approved?

When the session is linked to a ticket and the customer gives their e-mail on the authorization page, TicketResolve compares its fingerprint with the e-mail the ticket came from. The session then shows Verified: the e-mail matches the ticket’s requester, Not the ticket’s requester, or Not verified. Administrators can require a match (see the collection policy below).

Agent 2.0

Download the current agent from the authorization page. It runs the same way as before:

Shell
TR_CONNECT_TOKEN=trc_…  TR_URL=https://www.ticketresolve.ai  TR_AGENT_ID=prod-api-1  node tr-connect-agent.mjs
  • Heartbeat: every 30 seconds, with the progress of the task it is running. An agent not heard from for 90 seconds is shown as not reachable.
  • Capabilities: it reports which collectors it supports and what is configured on the machine (counts and types only — never paths’ contents or connection strings). A task it can’t run fails at once instead of waiting.
  • Reconnection: after a network error it tries again after 10 s, 20 s, 40 s … up to 5 minutes, and continues where it left off.
  • Safe re-sending: every result carries its task and attempt number. If a result is sent twice, TicketResolve keeps one copy.
  • Cancellation: when your team cancels a running task, the agent learns it from the next heartbeat and doesn’t send the result.
  • TR_AGENT_ID gives the instance a stable name; otherwise a random one is used per start.

Retries and the dead-letter list

Each task has a lease: 60 seconds for environment details, 120 for logs, containers and API checks, 180 for database metadata, 300 for reproduction. If the lease runs out, or the agent reports a network error or timeout, the task is retried after 30 s, then 60 s, then 120 s (bounded at 15 minutes), up to 3 attempts. Then it is marked gave up and listed on Connect Health. Configuration errors (“no log sources configured”) aren’t retried. Fix the agent’s settings, then use Retry.

Tasks can be given a priority (high, normal or low) and an idempotency key. Sending the same key again returns the existing task instead of creating another.

Versions

VersionStatus
2.0.0Current
1.2.xDeprecated — still runs tasks, without heartbeat, retries information or capability reporting
Older than 1.2.0Unsupported — receives no tasks; the agent prints an upgrade message and stops

Connect Health (administrators)

TR Investigate → Connect Health shows, for the last 24 hours to 90 days:

  • agents connected and not reachable, with version, instance, last seen, reconnects and capabilities;
  • active sessions, sessions awaiting authorization, failed or partial collections, expired sessions and sessions by phase;
  • pending tasks, retries, tasks that gave up (with Retry), and the average time from request to result;
  • collectors by success and failure, and read-only key use;
  • the agent and system log — activity only, never collected content, with secrets masked.

Collection policy

SettingDefault
Only the ticket’s requester may approveOff
Longest access window24 hours (1–72)
Default evidence retention30 days (1–90)
Browser evidence the recorder may offerConsole, network, performance and screenshots
Personal data filtersE-mail addresses, phone numbers and IP addresses on; up to 10 patterns of your own
Note:Passwords, tokens, authorization headers, cookies, browser storage and card numbers are always removed. Those can’t be switched off.

Policy changes are recorded in the audit log.

API

  • POST /api/trial/:id/connect/sessions/:sid/tasks — { kind, priority?, idempotencyKey? }
  • POST …/tasks/:taskId/cancel, POST …/tasks/:taskId/retry, POST …/tasks/cancel (all waiting)
  • POST …/sessions/:sid/finish
  • GET /api/trial/:id/connect/health?days=, GET|PUT /api/trial/:id/connect/policy (admins)
  • Agent: POST /api/connect/agent/v1/heartbeat, GET …/tasks, POST …/results (with attempt)