AI coding agents frequently misreport terminal results - claiming tests passed when they failed, or a build succeeded when it exited non-zero - so TruthLog records the real exit code and raw output of every terminal command, one glance away from ground truth.
TruthLog is built entirely on VS Code's Terminal Shell Integration API. It cannot see a command, its exit code, or its output without it.
Check that this setting is not disabled (it's on by default):
"terminal.integrated.shellIntegration.enabled": trueIf it's off, TruthLog shows a one-time notification with a button to turn it back on. It will not silently record nothing and pretend everything is fine - if it can't see ground truth, it says so.
- Records every command run in any VS Code integrated terminal: command text, exit code, timestamp, duration, working directory, and full stdout/stderr.
- Sidebar tree view (TruthLog icon in the Activity Bar) lists recent executions, newest first, colour-coded: 🟢 green = exit 0, 🔴 red = non-zero, ⚪ neutral = unknown.
- Click any entry to open its full raw output in a read-only editor tab.
- Filter toggle to show failures only.
TruthLog: Clear Historycommand from the Command Palette.
-
Download the latest
.vsixfrom the Releases page. -
In VS Code: Extensions view →
...menu → Install from VSIX... → select the file.Or from the command line (replace with the filename you downloaded):
code --install-extension truthlog-0.1.1.vsix
Search for TruthLog in the Extensions view, or once published:
code --install-extension abhijeet.truthlog| Setting | Default | Description |
|---|---|---|
truthlog.maxEntries |
50 |
Maximum number of executions kept in history. Oldest entries are dropped first. |
truthlog.maxOutputBytes |
102400 (100 KB) |
Maximum bytes of output retained per command. Output beyond this is truncated and flagged. |
Exact non-zero exit codes on PowerShell. On a PowerShell-integrated terminal (the Windows default), VS Code's own shellIntegration.ps1 computes the exit code it reports as [int]!$global:? - a 0/1 boolean derived from PowerShell's success flag, not $LASTEXITCODE. This means TruthLog reliably distinguishes exit 0 (pass) from any non-zero (fail) - the failure case this extension exists to catch - but a specific non-zero code (e.g. 3, 127) will display as 1 on PowerShell, because VS Code's own integration layer discards the real number before TruthLog ever sees it. Bash/zsh integration is not affected by this - $? there is the actual exit code. This is an upstream VS Code/PowerShell limitation, not something TruthLog can currently work around without injecting extra commands into your terminal, which it deliberately does not do.
cmd.exe is not supported. VS Code's shell integration is documented as out of scope for cmd.exe - cmd.exe has no way to surface a previous command's exit code to the prompt at all, so shell integration never activates for it, regardless of the terminal.integrated.shellIntegration.enabled setting. TruthLog detects this per terminal (using VS Code's terminal.state.shell detection) and shows a one-time warning naming cmd.exe specifically when this happens, rather than leaving the sidebar silently empty. Switch the terminal to PowerShell, bash, zsh, or fish to use TruthLog.
Everything stays on your machine. History is kept in memory and persisted only to VS Code's local workspaceState (so it survives a window reload) - there is no cloud sync, no account, no telemetry, and no network call of any kind.
TruthLog records raw ground truth; it does not parse or fact-check an AI agent's natural-language claims against that ground truth, sync across machines, or watch terminals outside VS Code.
npm install
npm run compile
npm test # launches a real VS Code Extension Development Host and runs the integration suiteMIT © Abhijeet
