Stu Mason
Stu Mason

Activity

Issue Resolved

Issue #82 closed: fix: deployment logs ignore lines parameter, return massive payloads

Problem

When fetching deployment logs with a lines parameter, the API returns the entire log instead of respecting the limit:

deployment (action: "get", uuid: "cc0okccggwcsscowso0gg8g4", lines: 50)

Error: result (917,680 characters) exceeds maximum allowed tokens

Requesting 50 lines should not return 917K characters.

Expected Behavior

The lines parameter should limit the response to approximately that many lines of log output, similar to tail -n 50.

Actual Behavior

The entire deployment log is returned regardless of the lines parameter, causing:

  • Token limit errors in Claude
  • Unusable responses that get saved to disk
  • Poor UX when trying to check deployment status

Suggested Fix

Either:

  1. Actually implement the lines parameter to tail the logs
  2. Add a max_chars or max_bytes parameter
  3. Return only the last N KB of logs by default

A deployment check shouldn't blow up the context window.