Skip to content

Bug: statusLine context_window data not updating (total_input_tokens always 0) #6

@ceragon

Description

@ceragon

Bug Description

The statusLine command receives stale/incorrect context_window data from Qoder CLI. All token counters remain at zero regardless of conversation length.

Reproduction

  1. Configure a custom statusLine command in settings.json:
{
  "statusLine": {
    "type": "command",
    "command": "~/.qoder/statusline-command.sh"
  }
}
  1. The command receives JSON input via stdin. Log the input during a conversation.

Expected Behavior

context_window fields should update as the conversation progresses:

  • total_input_tokens should increase with each message
  • total_output_tokens should increase with each response
  • used_percentage and remaining_percentage should reflect actual usage

Actual Behavior

All entries show identical values throughout the entire conversation:

"context_window": {
  "total_input_tokens": 0,
  "context_window_size": 180000,
  "used_percentage": 0,
  "remaining_percentage": 100
}

Note: total_output_tokens is not present in the JSON at all.

Environment

  • Qoder CLI version: latest
  • OS: macOS 25.3.0 (arm64)
  • Node.js: v24.3.0

Additional Context

The statusLine command is called correctly (verified 50+ invocations during a single session), but the context_window payload never changes. This makes it impossible to display real-time token usage in the status line.

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