Repository navigation
feat(debug): debug bundle reports config, credentials, sessions and runtime health; add debug probe
#1860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(debug): debug bundle reports config, credentials, sessions and runtime health; add debug probe
#1860
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,6 +86,8 @@ Enable verbose logging: | |||||
| altimate --print-logs --log-level DEBUG | ||||||
| ``` | ||||||
|
|
||||||
| To send a problem to Altimate support, a [debug report](#debug-report) is usually more useful than the raw logs: it summarizes the log and adds your configuration, credentials (presence only), session statistics and runtime health. | ||||||
|
|
||||||
| ## Common Issues | ||||||
|
|
||||||
| ### Provider Connection Failed | ||||||
|
|
@@ -257,15 +259,46 @@ $env:ALTIMATE_DEBUG = "1"; altimate | |||||
|
|
||||||
| In debug mode the log records every tool call as it starts and ends, and while one is running, a line every 15 seconds naming what is still in progress. Lines are written as they happen, so if Altimate Code hangs or closes, the log still shows what it was doing. | ||||||
|
|
||||||
| **2. Create the report** after the problem has happened: | ||||||
| **2. Create the report** after the problem has happened. See [Debug report](#debug-report) below. | ||||||
|
|
||||||
| ### Debug report | ||||||
|
|
||||||
| ```bash | ||||||
| altimate debug bundle | ||||||
| ``` | ||||||
|
|
||||||
| This writes `altimate-debug-report-<time>.md` in the current folder (use `--output <path>` to choose another place). It lists the problems it detected first, then the evidence: version and install method, operating system and terminal, warehouse connections (names, types, sign-in method and which fields are set, never values), MCP servers, a summary of the log, and the last 300 log lines. It also checks that the Snowflake and Databricks warehouses, the Altimate API, the telemetry endpoint (when telemetry is on) and the model catalogue this installation uses are reachable over HTTPS. Add `--no-network` (or `--network=false`) and the command makes no network requests at all, telemetry included. It does not start your project (plugins, language servers), so it still works when that is what hangs. The file is created readable only by you, where the filesystem supports it. | ||||||
| This writes `altimate-debug-report-<time>.md` in the current folder (use `--output <path>` to choose another place). Run it from the project folder where the problem happens, so it reads that project's configuration. It lists the problems it detected first, then the evidence: | ||||||
|
|
||||||
| - **Environment:** version and install method, operating system, terminal, Bun and Node.js versions, the Altimate account and free tier, and the telemetry machine id (left out when telemetry is off) and last launch id, which let support find your events without asking for logs. | ||||||
| - **Configuration:** each config file in the order it is merged and whether it loads, the `model` and `small_model` settings with the file that set each, the last model picked in the app, on/off settings, the permission mode, plugin names, and where skills and rules files are found, with counts (skill counts do not follow symlinks). | ||||||
| - **Credentials:** for each provider, where a credential was found (`auth.json`, an environment variable by name, or the config) and when a stored OAuth sign-in expires (API keys carry no expiry). Credential values are never included in the report. | ||||||
| - **Warehouse connections:** names, types, sign-in method and which fields are set, never values. | ||||||
| - **Workspace:** whether the project is linked to an Altimate workspace, whether the link belongs to the account signed in now, and when its skills and memory last synced. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The report cannot always determine whether the link matches the signed-in account: Prompt for AI agents
Suggested change
|
||||||
| - **Runtime health:** whether the native modules (the SQL engine, the file watcher, DuckDB) load, the size of the log, database and cache, free disk space, and a newer release if the app has seen one. | ||||||
| - **Sessions (last 14 days):** how many sessions there were, how many kept the `New session - <time>` placeholder title, how many ended in an error, the median time to the first reply, and failed replies by error class and HTTP status. Titles and messages are never read into the report. | ||||||
| - **Log:** MCP servers that failed to start, warehouse connection failures, failed session-title and prompt-enhancement requests (model, error class, HTTP status), and the last 300 log lines. | ||||||
|
|
||||||
| It also checks that the Snowflake and Databricks warehouses, the Altimate API, the telemetry endpoint (when telemetry is on) and the model catalogue this installation uses are reachable over HTTPS. Add `--no-network` (or `--network=false`) and the command makes no network requests at all, telemetry included. It does not start your project (plugins, language servers), so it still works when that is what hangs. The file is created readable only by you, where the filesystem supports it. | ||||||
|
|
||||||
| Passwords, keys, tokens and other secret settings (in `name=value`, JSON and connection-URL forms), email addresses, URL parameters, your home folder, your user name and your computer's name are removed. Keys recognisable by their shape (`sk-…`, `ghp_…`, `AKIA…`, `xox…-`, JWTs and other long mixed-case keys) are removed too. The report does include the telemetry machine id and last launch id, which identify this machine's telemetry events. This is pattern-based and can miss a secret in an unusual format, so read the report before you send it. It stays on your machine until you send it to Altimate support yourself. | ||||||
|
|
||||||
| ### Testing the models | ||||||
|
|
||||||
| ```bash | ||||||
| altimate debug probe | ||||||
| ``` | ||||||
|
|
||||||
| Sends one short request, with tools off, to the chat model and to the model used for session titles, chosen the way a session chooses them: the default agent's own model or the default model for chat, and for titles a model set on the `title` agent, else `small_model`, else a small model picked from the chat model's provider, else the chat model. For each it prints the model, where it came from, and either the time it took or why it failed: the error class and HTTP status, for example `AI_APICallError, HTTP 401, class auth` for a rejected API key. The reply text is not printed, and the output goes through the same redaction as the bundle. Use it when chat works but session titles stay `New session - <time>`. Unlike `debug bundle` it starts your project and sends requests to your providers, so it is a separate command; it exits with status 1 when a request fails. | ||||||
|
|
||||||
| ### Model catalogue | ||||||
|
|
||||||
| ```bash | ||||||
| altimate debug v2 | ||||||
| ``` | ||||||
|
|
||||||
| Prints, as JSON, the providers the model catalogue finds, its default model, and the small model it would pick for each provider. | ||||||
|
sahrizvi marked this conversation as resolved.
Resolved
|
||||||
|
|
||||||
| Passwords, keys, tokens and other secret settings (in `name=value`, JSON and connection-URL forms), email addresses, URL parameters, your home folder, your user name and your computer's name are removed. This is pattern-based and can miss a secret in an unusual format, so read the report before you send it. It stays on your machine until you send it to Altimate support yourself. | ||||||
| ### Raw logs | ||||||
|
|
||||||
| To save the raw logs to a file instead: | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUGGESTION: The page still says the machine id is always included
This bullet now says the machine id is "left out when telemetry is off", but the redaction paragraph below (line 283, not touched by this PR) still says "The report does include the telemetry machine id and last launch id". Update that sentence to match; the report header (
report.ts:863) and the new table row already carry the qualifier.