💡 Inspiration
Studies show it takes a software developer an average of 23 minutes and 15 seconds to regain deep focus after a single interruption.
When you get pulled away mid-investigation by an urgent meeting or on-call incident, you return to a messy terminal scrollback, half-baked diffs, and the agonizing dilemma: "Where was I, what hypotheses did I already disprove, and what should I run next?"
Most AI coding assistants try to autonomously rewrite code or scrape background history. We built ThreadBack to give developers their mental context back without sacrificing privacy: a local-first macOS assistant that records explicit evidence, saves checkpoints offline in 99 milliseconds, and uses NVIDIA Nemotron on Nebius Token Factory to synthesize source-linked, auditable Resume Capsules.
🚀 What It Does
ThreadBack lives quietly in the macOS menu bar, bound to approved Git project roots:
- Explicit, Opt-In Capture: Captures clean Git snapshots, opt-in wrapped terminal commands (
tb run -- <cmd>), and developer notes (Fact, Hypothesis, Question). It never captures ambient keystrokes or background terminal history. - Sub-100ms Offline Checkpoints: Hitting Save My Place writes your complete state to local SQLite WAL storage in under 100ms with zero network requests—allowing you to close your laptop immediately.
- Cryptographic Privacy Gate: Dual-stage regex scanner redacts live secrets (
sk_live_..., tokens, PEM keys). Entries with sensitive findings are hard-blocked from transmission. - Exact Payload Authorization: Displays the exact sanitized JSON payload and SHA-256 fingerprint before a single byte leaves your machine.
- NVIDIA Nemotron Resume Capsule: Nemotron synthesizes a structured capsule: separating Verified Facts (with clickable
[evt-1]citations to local traces) from Hypotheses, recording Failed Attempts (even if code was reverted), and suggesting the next action. - Repository Drift Sentinel: Upon return, ThreadBack compares the repository's
HEAD, branch, and dirty working tree against the checkpoint snapshot before showing resume actions. ThreadBack never executes commands automatically; it keeps the human firmly in control.
🛠️ How We Built It
- Core Engine (
threadback-corein Rust): Air-gapped domain engine enforcing strict canonical root boundaries (std::fs::canonicalize) to block path traversals and external symlinks. Uses SQLite inWALmode with commit-before-acknowledge durability. - Native Desktop Shell (
src-tauri): Tauri 2 macOS menu bar popover using Cocoa AppKit screen-tracking for seamless multi-monitor positioning. - Frontend: React 19 + TypeScript with end-to-end type safety generated directly from Rust types via
ts-rs. - Nebius Token Factory & NVIDIA Nemotron:
- Connects to
https://api.tokenfactory.nebius.com/v1runningnvidia/nemotron-3-super-120b-a12b. - API keys are stored exclusively in the macOS Keychain (
com.threadback.desktop.tokenfactory) and never written to SQLite, logs, or UI renderers. - Features an anti-prompt-injection untrusted evidence envelope and a deterministic single-pass repair engine if schema or provenance validation fails.
- Connects to
📊 Evaluation & Benchmarks
ThreadBack includes an automated 10-scenario evaluation harness (npm run eval) and 5 persona workflows (W01–W05):
- Fact Evidence Precision: 100.0% (10/10)
- Unsupported Verified Claims: 0 (Zero Hallucination)
- Seeded Secret Leakage: 0 bytes
- Offline Save Latency: 99 ms max
- Nemotron Inference Latency on Nebius: p50 = 415 ms, p95 = 490 ms
- Resume Effort Reduction: 75% fewer inspection steps
🥊 Challenges We Ran Into
- Eliminating Hallucinations in Terminal Logs: Raw compiler traces and stack traces are messy. We isolated evidence into strict untrusted envelopes and built a Rust-level provenance checker requiring every verified fact to cite a valid local event ID.
- Multi-Monitor Display Positioning on macOS: Coordinating AppKit screen geometries across external monitors with differing display scale factors required native AppKit cursor tracking.
- Zero-Friction Privacy: Balancing security with developer velocity by providing deterministic two-stage redaction and an audited payload preview modal.
🏆 Accomplishments We're Proud Of
- Achieving 100% provenance precision with zero unsupported claims.
- Lightning-fast sub-100ms local offline saves.
- Full auditability: preserving the immutable raw model draft alongside the user's approved capsule and edit diffs.
🔮 What's Next for ThreadBack
- Signed Team Capsules: Exporting cryptographically verified Markdown capsules for shift handovers and PR descriptions.
- Editor Extensions: Lightweight VS Code and Neovim plugins to jump directly to cited source lines from the capsule's next action.
Built With
- macos
- nebius-token-factory
- nvidia-nemotron
- react
- rust
- sqlite
- tauri
- typescript
Log in or sign up for Devpost to join the conversation.