Python traceback cleaner

Python traceback cleaner for ChatGPT and coding agents

Paste raw Python traceback output and get a concise debugging brief for ChatGPT, Codex, Claude Code, OpenCode, or another coding agent.

Python errors often include repeated startup logs, framework internals, site-packages frames, and wrapper messages. tokensift keeps the exception and user-code evidence first so the coding agent does not have to infer the root cause from log spam.

Before and after

Before: raw paste

$ python app/main.py --config configs/prod.yaml
INFO booting app
INFO booting app
INFO loading plugins
INFO loading plugins
Traceback (most recent call last):
  File "/workspace/app/main.py", line 12, in <module>
    from app.routes import create_router
  File "/workspace/app/routes.py", line 8, in <module>
    from pydantic_settings import BaseSettings
ModuleNotFoundError: No module named 'pydantic_settings'

During handling of the above exception, another exception occurred:
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
app failed: exit status 1

After: compact debugging brief

Debug Python traceback.

Type:
- Python traceback

Keep:
- cmd: python app/main.py --config configs/prod.yaml
- frame: /workspace/app/main.py:12 -> from app.routes import create_router
- frame: /workspace/app/routes.py:8 -> from pydantic_settings import BaseSettings
- error: ModuleNotFoundError: No module named 'pydantic_settings'
- wrapper: app failed: exit status 1

Folded:
- duplicate startup INFO lines, framework wrapper frames, site-packages internals

Ask: root cause, smallest fix, verify command.

Preserved evidence

  • Python command and config argument
  • exception type and message
  • user file paths and line numbers
  • failing import statement
  • wrapper exit detail as secondary evidence

Folded noise

  • duplicate boot/plugin logs
  • framework wrapper stack frames
  • site-packages frames unrelated to the missing import
  • generic process-exit wrapper noise

How to use it well

Keep the last exception line and the first user-code frame above it. For import errors, the failing import line is often more useful than dozens of framework frames.

Paste the relevant failure output into the main tool, run Sift, then review the compact brief before sending it to Codex, Claude Code, ChatGPT, OpenCode, or another coding agent.

Privacy note: No LLM API call. No raw logs sent to external model providers, ad providers, or third-party analytics. Hosted submissions may be stored in a private first-party database for diagnostics and retained for up to 30 days by default, so review and redact before use.

Open tokensift and paste your own log.