Skip to content

Tasks: Activity bump on log viewing #1273

Closed
Closed

Description

@mafredri

Repo: coder/coder

Scope: Add workspace activity bump when users view task logs to prevent auto-pause during active monitoring.

Problem: Currently, viewing task logs via /logs endpoint does not bump workspace deadline. A user actively monitoring a task (checking logs every few minutes) will see the task auto-pause despite their engagement. This creates an inconsistent experience where UI interaction differs from CLI behavior.

Changes:

  • Modify GET /api/v2/tasks/{user}/{task}/logs in coderd/aitasks.go
  • Call ActivityBumpWorkspace when logs are fetched for an active task (not when paused - that's just viewing the snapshot)
  • Use the same activity bump logic as other user interactions

Files:

  • coderd/aitasks.go

Acceptance criteria:

  • Viewing logs for active task bumps workspace deadline
  • Viewing snapshot for paused task does NOT bump deadline
  • Activity bump uses same logic as other workspace interactions
  • No regression in log viewing performance

Dependencies: None

References:

Activity

  1. added theissue type on Jan 15, 2026
  2. Shelnutt2 commented on May 11, 2026

    @Shelnutt2

    Closing as Coder Agents will replace tasks so this doesn't need to get finalized.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions