aws / aws/amazon-q-developer-cli

Q Analytics usage report shows 0 AI code lines when using CLI

Open
#3,588 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

Linux 6.8.0-90-generic - Ubuntu 22.04.5 LTS

### Expected behaviour

The usage report should accurately track and display the number of AI-generated code lines when using Amazon Q through the CLI, similar to how it tracks other usage metrics.

### Actual behaviour

The Q usage report consistently shows 0 for AI code lines even when Amazon Q generates code through the CLI (q chat command). Code generation is working properly, but the metrics are not being tracked or reported correctly.

```
[chat-transcript]
> i have issue with q analytics

I can help you troubleshoot issues with Q Analytics. To better assist you, could you provide more details about:

- What specific problem are you experiencing?
- Are you getting any error messages?
- What were you trying to do when the issue occurred?
- Are you working with Amazon QuickSight, Amazon Q Business analytics, or another Q Analytics feature?

Once I understand the specific issue, I can help you resolve it or we can report it if it's a bug.
[Tool uses: none]

> in my q usage report i can not see ai code line, it's always show 0 when i use q by cli

This is a known issue where AI code line metrics aren't being properly tracked when using Amazon Q through the CLI. The usage report should show code lines generated, but it's displaying 0 even when Q generates code via `q chat`.

Let me help you report this issue to get it fixed:
[Tool uses: report_issue]
```

### Steps to reproduce

1. Use 'q chat' command to interact with Amazon Q
2. Request code generation from Q (any programming language)
3. Q generates code successfully
4. Check Q Analytics usage report
5. Observe that AI code lines shows 0 despite code being generated

### Environment

```yaml

[q-details]
version = "1.13.1"
hash = "c658e9e187b6264a24821db3a3ddc591e3095d2f"
date = "2025-08-01T22:09:51.266693Z (157d ago)"

[system-info]
chip = "Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz"
total-cores = 2
memory = "15.53 GB"

[system-info.os.linux]
kernel_version = "6.8.0-90-generic"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 22.04.5 LTS"
version_id = "22.04"
version = "22.04.5 LTS (Jammy Jellyfish)"

[environment]
cwd = "/home/USER"
cli-path = "/home/USER"
install-method = "unknown"

[env-vars]
DISPLAY = ":0"
GTK_IM_MODULE = "ibus"
PATH = "/home/USER/.amazon-q/bin:/home/USER/.amazon-q/bin:/home/USER/.amazon-q/bin:/home/USER/.nvm/versions/node/v18.4.0/bin:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/USER/.local/bin:/usr/local/go/bin:/home/USER/go/bin"
QTERM_SESSION_ID = "9ed401fdaef34e0bbf530e527df070f2"
QT_IM_MODULE = "ibus"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.13.1"
SHELL = "/bin/bash"
TERM = "xterm-256color"
XDG_CURRENT_DESKTOP = "ubuntu:GNOME"
XDG_SESSION_DESKTOP = "ubuntu-xorg"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"

[chat-settings]

[chat-trusted_tools]
fs_read=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=q_cli_default
profile_context=
AmazonQ.md
README.md
.amazonq/rules/**/*.md

files=none
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.