code-cli icon indicating copy to clipboard operation
code-cli copied to clipboard

[Auto] Error: Failed to parse config at /var/folders/t1/2g8dxmj56vqd9qx_f0h1xs7r0000gn/T/autoh

Open igorcosta opened this issue 5 months ago • 1 comments

Auto-Reported Error

Field Value
Error Type Error
CLI Version 0.8.2
Model N/A
Provider N/A
Platform darwin 24.5.0
Session ID N/A
Report ID xSP2tgOKYFeKWLy3ZjXbX

Error Message

Failed to parse config at /var/folders/t1/2g8dxmj56vqd9qx_f0h1xs7r0000gn/T/autohand-config-cli-test-iJyLHp/config.json: Expected property name or '}' in JSON at position 2 (line 1 column 3) You can fix this by editing /var/folders/t1/2g8dxmj56vqd9qx_f0h1xs7r0000gn/T/autohand-config-cli-test-iJyLHp/config.json, or delete it and run 'autohand --setup' to recreate.

Stack Trace

Error: Failed to parse config at /var/folders/t1/2g8dxmj56vqd9qx_f0h1xs7r0000gn/T/autohand-config-cli-test-iJyLHp/config.json: Expected property name or '}' in JSON at position 2 (line 1 column 3) You can fix this by editing /var/folders/t1/2g8dxmj56vqd9qx_f0h1xs7r0000gn/T/autohand-config-cli-test-iJyLHp/config.json, or delete it and run 'autohand --setup' to recreate.
    at loadConfig (~/Documents/autohand/cli-3/src/config.ts:443:11)
    at async displayPermissions (~/Documents/autohand/cli-3/src/index.ts:1658:18)
    at async Command.<anonymous> (~/Documents/autohand/cli-3/src/index.ts:295:7)
    at async Command.parseAsync (~/Documents/autohand/cli-3/node_modules/commander/lib/command.js:1122:5)

Session Context

  • Conversation length: N/A messages
  • Context usage: N/A
  • Last tools used: N/A
  • Retry attempt: N/A

Additional Context

{
  "source": "process",
  "handler": "unhandledRejection",
  "clientName": "cli",
  "fatal": false,
  "rawType": "object"
}

Auto-reported by Autohand CLI v0.8.2 | Report ID: xSP2tgOKYFeKWLy3ZjXbX

igorcosta avatar Jun 12 '26 12:06 igorcosta

Fixed in commits 50be430 and bd1a11e.

What happened:

  • This report was generated by the failing invalid-config CLI regression reproducer during this issue pass.
  • 50be430 fixed startup config parse failures so they print recovery guidance and exit 1 instead of escaping as unhandled rejections.
  • bd1a11e added AUTOHAND_DISABLE_AUTO_REPORT=1 support and uses it in CLI subprocess tests so intentional failing reproducers do not open GitHub auto-report issues.

Validation:

  • bun run test tests/configCliCommands.spec.ts
  • bun run test tests/reporting/processErrorReporting.spec.ts
  • bun run lint
  • bun run proof

Tip: repair the config JSON or delete it and run autohand --setup to recreate it.

igorcosta avatar Jun 12 '26 12:06 igorcosta

Closing as fixed in current main by commits fbb14e3, 50be430, and bd1a11e, which handle invalid config-set usage and config parse/startup failures without process auto-report spam.

igorcosta avatar Jun 22 '26 21:06 igorcosta