)]}'
{
  "commit": "e6c294dc139cf229ba790abc87a524016f98627f",
  "tree": "1a181005f78a908112288e814bd60205b060a436",
  "parents": [
    "2f0eb6995fc1041d23b8224a099013e89bb03f67"
  ],
  "author": {
    "name": "Philip Zeyliger",
    "email": "philip@bold.dev",
    "time": "Wed Jun 04 16:55:21 2025 +0000"
  },
  "committer": {
    "name": "Philip Zeyliger",
    "email": "philip@bold.dev",
    "time": "Wed Jun 04 09:57:17 2025 -0700"
  },
  "message": "budget: remove num-iterations and wall clock time limits\n\nRemove iteration count and time-based budget limits from the agent budget system\nwhile preserving the budget concept for dollar-based limits only.\n\nProblem Analysis:\nThe budget system previously supported three types of limits:\n1. MaxResponses (iteration count limit)\n2. MaxWallTime (wall clock time limit)\n3. MaxDollars (cost limit)\n\nThis created complexity in both implementation and user experience, with\nmultiple overlapping budget mechanisms that could trigger independently.\nThe iteration and time limits added limited value compared to the more\npractical dollar-based budget control.\n\nImplementation Changes:\n\n1. Budget Structure Simplification:\n   - Remove MaxResponses and MaxWallTime fields from Budget struct\n   - Keep only MaxDollars field for cost-based budget control\n   - Simplify Budget to single-field struct with clear purpose\n\n2. CLI Flag Removal:\n   - Remove -max-iterations flag from command line interface\n   - Remove -max-wall-time flag from command line interface\n   - Keep -max-dollars flag with same functionality\n   - Remove unused time import from cmd/sketch/main.go\n\n3. Budget Logic Streamlining:\n   - Simplify ResetBudget() to only adjust MaxDollars based on usage\n   - Simplify overBudget() to only check dollar limits\n   - Remove iteration and time checking logic throughout\n\n4. Container Configuration Updates:\n   - Remove MaxIterations and MaxWallTime from ContainerConfig struct\n   - Remove corresponding docker command arguments\n   - Maintain MaxDollars configuration and passing\n\n5. UI Cleanup:\n   - Remove budget display of max responses and max wall time from termui\n   - Keep dollar-based budget information display\n\n6. Test Updates:\n   - Update test Budget initialization to use only MaxDollars\n   - Verify all existing tests continue to pass\n\nTechnical Details:\n- Budget struct now contains only MaxDollars float64 field\n- ResetBudget adjusts budget by adding current TotalCostUSD to MaxDollars\n- overBudget checks only dollar spending against MaxDollars limit\n- CLI help shows only -max-dollars option, no iteration/time options\n- Docker container launch passes only max-dollars parameter\n\nBenefits:\n- Simplified budget system with single, clear cost control mechanism\n- Reduced complexity in budget logic and error handling\n- Cleaner CLI interface with fewer confusing options\n- More predictable budget behavior focused on practical cost limits\n- Easier to understand and configure for users\n\nTesting:\n- All existing tests pass with updated budget structure\n- CLI help verification shows only max-dollars option\n- Build verification confirms no compilation errors\n- Budget functionality preserved for dollar-based limits\n\nThis change streamlines the budget system to focus on practical cost control\nwhile maintaining all existing dollar-based budget functionality and removing\ncomplexity around iteration and time-based limits.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sa7be127e12d43ee7k\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "726e59a856f7888da674240dc92e860197df0a24",
      "old_mode": 33188,
      "old_path": "cmd/sketch/main.go",
      "new_id": "8067af7e111ab03aebe1c95d134e2555385200f5",
      "new_mode": 33188,
      "new_path": "cmd/sketch/main.go"
    },
    {
      "type": "modify",
      "old_id": "79d4b2854d0a05d7108ba75cc24fa2855f86cf23",
      "old_mode": 33188,
      "old_path": "dockerimg/dockerimg.go",
      "new_id": "0759b22d364eae80396ce001ea3f7266ae41a6dd",
      "new_mode": 33188,
      "new_path": "dockerimg/dockerimg.go"
    },
    {
      "type": "modify",
      "old_id": "f4ed0bd84d3108a46f4a95549e0e28b3c8dc7ec7",
      "old_mode": 33188,
      "old_path": "llm/conversation/convo.go",
      "new_id": "95e4fbaa02dd439aefb54587b6d606191f6a4db3",
      "new_mode": 33188,
      "new_path": "llm/conversation/convo.go"
    },
    {
      "type": "modify",
      "old_id": "8e6a75dfbd3d5b9c9e54910544f43bf3368a42c2",
      "old_mode": 33188,
      "old_path": "loop/agent_test.go",
      "new_id": "30affbe5e3bffd3179cf986440e8000dc4ab45d5",
      "new_mode": 33188,
      "new_path": "loop/agent_test.go"
    },
    {
      "type": "modify",
      "old_id": "b14593d35b7e8a5918d4305666893fb90a0119c9",
      "old_mode": 33188,
      "old_path": "termui/termui.go",
      "new_id": "1890231a060dfb754956806543f8ffe1842356ce",
      "new_mode": 33188,
      "new_path": "termui/termui.go"
    }
  ]
}
