sliceagent 0.1.18__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. {sliceagent-0.1.18 → sliceagent-0.2.0}/.gitignore +3 -0
  2. {sliceagent-0.1.18 → sliceagent-0.2.0}/CHANGELOG.md +42 -0
  3. {sliceagent-0.1.18 → sliceagent-0.2.0}/PKG-INFO +78 -29
  4. {sliceagent-0.1.18 → sliceagent-0.2.0}/QUICKSTART.md +24 -3
  5. {sliceagent-0.1.18 → sliceagent-0.2.0}/README.md +77 -28
  6. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/README.md +14 -1
  7. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/run.py +48 -11
  8. sliceagent-0.2.0/benchmarks/subagent_fanout.py +729 -0
  9. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/__init__.py +1 -1
  10. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/agents.py +2 -1
  11. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/cli.py +394 -105
  12. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/code_index.py +1 -1
  13. sliceagent-0.2.0/src/sliceagent/context.py +314 -0
  14. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/envspec.py +12 -3
  15. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/errors.py +4 -2
  16. sliceagent-0.2.0/src/sliceagent/events.py +163 -0
  17. sliceagent-0.2.0/src/sliceagent/execution.py +467 -0
  18. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/hippocampus.py +86 -16
  19. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/hooks.py +121 -4
  20. sliceagent-0.2.0/src/sliceagent/intent.py +724 -0
  21. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/interfaces.py +12 -1
  22. sliceagent-0.2.0/src/sliceagent/loop.py +995 -0
  23. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/mcp_client.py +10 -2
  24. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/memory.py +28 -2
  25. sliceagent-0.2.0/src/sliceagent/model_runner.py +47 -0
  26. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/monitor.py +34 -7
  27. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/neocortex.py +5 -2
  28. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/onboarding.py +4 -1
  29. sliceagent-0.2.0/src/sliceagent/oracle.py +52 -0
  30. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/pagetable.py +1 -1
  31. sliceagent-0.2.0/src/sliceagent/persistence.py +1268 -0
  32. sliceagent-0.2.0/src/sliceagent/pfc.py +446 -0
  33. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/platform_compat.py +135 -5
  34. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/policy.py +14 -4
  35. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/procman.py +40 -26
  36. sliceagent-0.2.0/src/sliceagent/progress.py +464 -0
  37. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/prompt.py +10 -3
  38. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/recovery.py +22 -4
  39. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/regions.py +273 -49
  40. sliceagent-0.2.0/src/sliceagent/registry.py +242 -0
  41. sliceagent-0.2.0/src/sliceagent/runtime_persistence.py +583 -0
  42. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/sandbox.py +47 -6
  43. sliceagent-0.2.0/src/sliceagent/scheduler.py +200 -0
  44. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/seed.py +36 -18
  45. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/session.py +68 -21
  46. sliceagent-0.2.0/src/sliceagent/slice_state.py +221 -0
  47. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/subagent.py +343 -60
  48. sliceagent-0.2.0/src/sliceagent/subagent_contract.py +407 -0
  49. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/swap.py +2 -1
  50. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/taskstate.py +36 -2
  51. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/terminal.py +36 -30
  52. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/tools.py +193 -23
  53. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/tui.py +555 -269
  54. sliceagent-0.2.0/src/sliceagent/workspace_revision.py +117 -0
  55. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_ask_echo.py +4 -2
  56. sliceagent-0.2.0/tests/test_benchmark_runner.py +164 -0
  57. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bound_is_relevance.py +7 -8
  58. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_breadth_e2e.py +1 -1
  59. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_p0a.py +2 -2
  60. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bughunt_fixes.py +37 -25
  61. sliceagent-0.2.0/tests/test_context_elasticity.py +490 -0
  62. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_conversation.py +15 -1
  63. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_echo_before_blocking.py +14 -1
  64. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_episode.py +42 -2
  65. sliceagent-0.2.0/tests/test_event_dispatch.py +46 -0
  66. sliceagent-0.2.0/tests/test_execution_kernel.py +937 -0
  67. sliceagent-0.2.0/tests/test_extreview_fixes.py +131 -0
  68. sliceagent-0.2.0/tests/test_intent_state.py +509 -0
  69. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_live_composer.py +46 -34
  70. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_loop_overflow.py +72 -10
  71. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_mcp_runtime.py +28 -1
  72. sliceagent-0.2.0/tests/test_model_call_observability.py +282 -0
  73. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_monitor.py +20 -1
  74. sliceagent-0.2.0/tests/test_persistence_protocol.py +385 -0
  75. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_procman.py +19 -0
  76. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_product_features.py +81 -13
  77. sliceagent-0.2.0/tests/test_progress_status.py +158 -0
  78. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_provenance.py +21 -10
  79. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_readonly_subagent.py +9 -4
  80. sliceagent-0.2.0/tests/test_requirements.py +240 -0
  81. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_route_lexical.py +10 -5
  82. sliceagent-0.2.0/tests/test_runtime_boundaries.py +257 -0
  83. sliceagent-0.2.0/tests/test_runtime_persistence.py +687 -0
  84. sliceagent-0.2.0/tests/test_slice_lifecycle.py +154 -0
  85. sliceagent-0.2.0/tests/test_subagent_contract.py +488 -0
  86. sliceagent-0.2.0/tests/test_subagent_review_fixes.py +102 -0
  87. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_subagent_roster.py +7 -2
  88. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_task_state_roundtrip.py +10 -0
  89. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tool_dedup.py +8 -4
  90. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_topic_switch.py +61 -1
  91. sliceagent-0.2.0/tests/test_tui.py +225 -0
  92. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tui_render.py +61 -9
  93. sliceagent-0.2.0/tests/test_turn_progress.py +270 -0
  94. sliceagent-0.2.0/tests/test_workspace_revision.py +83 -0
  95. sliceagent-0.1.18/src/sliceagent/events.py +0 -96
  96. sliceagent-0.1.18/src/sliceagent/loop.py +0 -556
  97. sliceagent-0.1.18/src/sliceagent/oracle.py +0 -38
  98. sliceagent-0.1.18/src/sliceagent/pfc.py +0 -447
  99. sliceagent-0.1.18/src/sliceagent/registry.py +0 -128
  100. sliceagent-0.1.18/src/sliceagent/scheduler.py +0 -92
  101. sliceagent-0.1.18/tests/test_progress_status.py +0 -96
  102. sliceagent-0.1.18/tests/test_requirements.py +0 -156
  103. sliceagent-0.1.18/tests/test_slice_lifecycle.py +0 -87
  104. sliceagent-0.1.18/tests/test_tui.py +0 -133
  105. {sliceagent-0.1.18 → sliceagent-0.2.0}/.dockerignore +0 -0
  106. {sliceagent-0.1.18 → sliceagent-0.2.0}/.env.example +0 -0
  107. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  108. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  109. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  110. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/dependabot.yml +0 -0
  111. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/workflows/ci.yml +0 -0
  112. {sliceagent-0.1.18 → sliceagent-0.2.0}/.github/workflows/publish.yml +0 -0
  113. {sliceagent-0.1.18 → sliceagent-0.2.0}/CODE_OF_CONDUCT.md +0 -0
  114. {sliceagent-0.1.18 → sliceagent-0.2.0}/CONTRIBUTING.md +0 -0
  115. {sliceagent-0.1.18 → sliceagent-0.2.0}/Dockerfile +0 -0
  116. {sliceagent-0.1.18 → sliceagent-0.2.0}/LICENSE +0 -0
  117. {sliceagent-0.1.18 → sliceagent-0.2.0}/NOTICE +0 -0
  118. {sliceagent-0.1.18 → sliceagent-0.2.0}/SECURITY.md +0 -0
  119. {sliceagent-0.1.18 → sliceagent-0.2.0}/assets/sliceagent-core-loop.gif +0 -0
  120. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s1_longhorizon_debug/meta.json +0 -0
  121. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s1_longhorizon_debug/prompts.json +0 -0
  122. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s1_longhorizon_debug/reference_fix.py +0 -0
  123. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s1_longhorizon_debug/setup.py +0 -0
  124. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s1_longhorizon_debug/verify.py +0 -0
  125. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s2_taskdag_scheduler/meta.json +0 -0
  126. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s2_taskdag_scheduler/prompts.json +0 -0
  127. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s2_taskdag_scheduler/reference_fix.py +0 -0
  128. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s2_taskdag_scheduler/setup.py +0 -0
  129. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s2_taskdag_scheduler/verify.py +0 -0
  130. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s3_intervalset_algebra/meta.json +0 -0
  131. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s3_intervalset_algebra/prompts.json +0 -0
  132. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s3_intervalset_algebra/reference_fix.py +0 -0
  133. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s3_intervalset_algebra/setup.py +0 -0
  134. {sliceagent-0.1.18 → sliceagent-0.2.0}/benchmarks/multiturn_coding/s3_intervalset_algebra/verify.py +0 -0
  135. {sliceagent-0.1.18 → sliceagent-0.2.0}/examples/plugins/hello/__init__.py +0 -0
  136. {sliceagent-0.1.18 → sliceagent-0.2.0}/examples/plugins/hello/plugin.toml +0 -0
  137. {sliceagent-0.1.18 → sliceagent-0.2.0}/install.ps1 +0 -0
  138. {sliceagent-0.1.18 → sliceagent-0.2.0}/install.sh +0 -0
  139. {sliceagent-0.1.18 → sliceagent-0.2.0}/pyproject.toml +0 -0
  140. {sliceagent-0.1.18 → sliceagent-0.2.0}/scripts/check_windows_footguns.py +0 -0
  141. {sliceagent-0.1.18 → sliceagent-0.2.0}/scripts/gen_config_reference.py +0 -0
  142. {sliceagent-0.1.18 → sliceagent-0.2.0}/scripts/run_tests.sh +0 -0
  143. {sliceagent-0.1.18 → sliceagent-0.2.0}/sliceagent.toml.example +0 -0
  144. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/__main__.py +0 -0
  145. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/access.py +0 -0
  146. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/background_review.py +0 -0
  147. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/binsniff.py +0 -0
  148. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/clock.py +0 -0
  149. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/code_grep.py +0 -0
  150. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/config.py +0 -0
  151. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/context_overflow.py +0 -0
  152. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/finding_types.py +0 -0
  153. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/flags.py +0 -0
  154. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/fuzzy.py +0 -0
  155. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/guardrails.py +0 -0
  156. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/guidance.py +0 -0
  157. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/llm.py +0 -0
  158. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/mcp_security.py +0 -0
  159. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/metrics.py +0 -0
  160. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/model_catalog.py +0 -0
  161. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/plugins.py +0 -0
  162. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/records.py +0 -0
  163. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/retriever.py +0 -0
  164. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/safety.py +0 -0
  165. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/search_index.py +0 -0
  166. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/sensory_cortex.py +0 -0
  167. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/skill_provenance.py +0 -0
  168. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/skill_usage.py +0 -0
  169. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/skills.py +0 -0
  170. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/subdir_hints.py +0 -0
  171. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/telemetry.py +0 -0
  172. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/text_utils.py +0 -0
  173. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/tool_summary.py +0 -0
  174. {sliceagent-0.1.18 → sliceagent-0.2.0}/src/sliceagent/web.py +0 -0
  175. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/README.md +0 -0
  176. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_active_focus.py +0 -0
  177. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_agents.py +0 -0
  178. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_ask_user.py +0 -0
  179. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_background_review.py +0 -0
  180. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_binary_view.py +0 -0
  181. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_2b.py +0 -0
  182. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_breadth_wave.py +0 -0
  183. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_current_request.py +0 -0
  184. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_linenum.py +0 -0
  185. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_loop_wave.py +0 -0
  186. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_memory_wave.py +0 -0
  187. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_p0b.py +0 -0
  188. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_p0c.py +0 -0
  189. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_selfreview.py +0 -0
  190. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_selfreview_siblings.py +0 -0
  191. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_skills_h1.py +0 -0
  192. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_slice_wave.py +0 -0
  193. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_subagent_wave.py +0 -0
  194. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_bugfix_tools_wave.py +0 -0
  195. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_cache_manifest.py +0 -0
  196. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_checkpoint.py +0 -0
  197. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_cli_smoke.py +0 -0
  198. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_closure.py +0 -0
  199. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_code_grep.py +0 -0
  200. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_code_index.py +0 -0
  201. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_config_docs_current.py +0 -0
  202. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_config_journey.py +0 -0
  203. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_consolidate.py +0 -0
  204. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_context_overflow.py +0 -0
  205. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_coresidency.py +0 -0
  206. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_errors_backoff.py +0 -0
  207. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_esc_sentinel.py +0 -0
  208. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_exec_env.py +0 -0
  209. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_file_lock.py +0 -0
  210. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_finding_types.py +0 -0
  211. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_flags.py +0 -0
  212. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_fuzzy.py +0 -0
  213. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_ghost_index.py +0 -0
  214. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_guardrails.py +0 -0
  215. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_guidance.py +0 -0
  216. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_history.py +0 -0
  217. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_invariant_fixes.py +0 -0
  218. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_llm_cache.py +0 -0
  219. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_llm_streaming.py +0 -0
  220. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_llm_usage_cache.py +0 -0
  221. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_llm_watchdog.py +0 -0
  222. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_log_redaction.py +0 -0
  223. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_mcp_output_cap.py +0 -0
  224. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_memory.py +0 -0
  225. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_memory_persist.py +0 -0
  226. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_menu_select.py +0 -0
  227. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_metrics.py +0 -0
  228. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_mining.py +0 -0
  229. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_model_catalog.py +0 -0
  230. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_model_identity.py +0 -0
  231. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_onboarding.py +0 -0
  232. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_pageout_compaction.py +0 -0
  233. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_permission_patterns.py +0 -0
  234. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_pinned_composer.py +0 -0
  235. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_plan_tier.py +0 -0
  236. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_prompt_ab.py +0 -0
  237. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_provider_lineup.py +0 -0
  238. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_proxy_interrupt.py +0 -0
  239. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_reach.py +0 -0
  240. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_recall_search.py +0 -0
  241. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_records.py +0 -0
  242. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_refault.py +0 -0
  243. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_registry_validation.py +0 -0
  244. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_reliability.py +0 -0
  245. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_repo_map_bounded.py +0 -0
  246. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_review_fixes.py +0 -0
  247. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_safety.py +0 -0
  248. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_seal_markdown.py +0 -0
  249. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_search_index.py +0 -0
  250. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_selfreview_fixes.py +0 -0
  251. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_skill_meta.py +0 -0
  252. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_skill_metadata.py +0 -0
  253. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_subagent_artifacts.py +0 -0
  254. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_subdir_hints.py +0 -0
  255. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_task_agnostic.py +0 -0
  256. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_telemetry_convergence.py +0 -0
  257. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_terminal.py +0 -0
  258. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tool_result_ok.py +0 -0
  259. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tools_robust.py +0 -0
  260. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_trajectory.py +0 -0
  261. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tui_menus.py +0 -0
  262. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_tui_widgets.py +0 -0
  263. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_turn_budget.py +0 -0
  264. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_verification_agent.py +0 -0
  265. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_web.py +0 -0
  266. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_windows_footguns.py +0 -0
  267. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_workspace.py +0 -0
  268. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_world_region.py +0 -0
  269. {sliceagent-0.1.18 → sliceagent-0.2.0}/tests/test_world_state.py +0 -0
@@ -27,6 +27,9 @@ scratch/
27
27
  evals/prompt_ab/variants/
28
28
  evals/prompt_ab/runs/
29
29
 
30
+ # internal design doc — kept local, not published to the repo or the sdist
31
+ CORE-DESIGN.md
32
+
30
33
  # local sliceagent state / monitor runtime (personal; not part of the repo)
31
34
  .sliceagent/
32
35
  .memagent/ # legacy pre-rename state dir (ignore so an upgraded checkout stays clean)
@@ -5,6 +5,48 @@ this project aims for [Semantic Versioning](https://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.2.0] — 2026-07-10
9
+
10
+ A typed re-architecture of the core around a single canonical design (elastic slice, execution kernel,
11
+ crash-safe persistence), plus a rebuilt Rich TUI. No change to the thesis — same history-bounded,
12
+ task-elastic slice — but the invariants are now enforced by typed subsystems rather than convention.
13
+
14
+ ### Added
15
+ - **Typed core kernel.** The active slice is split into typed semantic regions (intent, task, evidence,
16
+ working set, continuity, turn runtime), each owning its own seal/reset lifecycle, replacing the flat
17
+ field-classification table. A provenance-tagged **intent ledger** captures verbatim user directives with
18
+ their source handles, deterministically promotes explicit constraint language (`must`/`never`/`only`),
19
+ and records supersession/satisfaction as explicit transitions.
20
+ - **Execution kernel.** Structured tool outcomes (succeeded/failed/cancelled/**indeterminate**), ordered
21
+ read/write waves (pure reads parallel, effects as barriers), reconciliation gates that block dependent
22
+ actions after an unprovable outcome, and one capacity-preflighted model-call path.
23
+ - **Crash-safe persistence.** A pending-journal → immutable-artifact → checkpoint compare-and-swap commit
24
+ order with idempotent replay, a full error taxonomy, and an OS-backed workspace lease, so an interrupted
25
+ turn resumes without re-running side effects. Dependency-scoped workspace revisions stale only the claims
26
+ whose inputs actually changed.
27
+ - **Rebuilt TUI.** A single `TurnProgress` event reducer folds loop events into an immutable snapshot;
28
+ the renderer projects that snapshot (semantic tool buckets, bounded plan/tally, width-responsive
29
+ diagnostics, one live-status owner) instead of interpreting events independently.
30
+
31
+ ### Changed
32
+ - Elastic residency is centralized: a pressure controller chooses graded fidelity globally
33
+ (full → excerpt → digest → locator) so no region can consume the window unnoticed.
34
+ - Per-turn cost framing corrected throughout the docs to **history-bounded, task-elastic** — bounded with
35
+ respect to session length, not a fixed size regardless of task breadth.
36
+
37
+ ### Fixed
38
+ - **Intent ledger and progress signals no longer lost on resume.** Checkpoint state is deep-frozen on
39
+ write; the resume and crash-recovery paths now thaw it fully at the boundary (and the deserializers
40
+ accept any `Mapping`), so binding user directives and their provenance survive a restart instead of
41
+ being silently dropped.
42
+ - **A completed first-turn objective no longer stays pinned as a mandatory, un-pageable block** — a clean
43
+ turn with no unresolved state marks it pageable background; unresolved state or explicit continuation
44
+ keeps it active.
45
+ - Security/reliability hardening from external review: WAL/recovery redacts tool-call arguments; process
46
+ kill reaps the whole spawn-captured process group; `code_review` and the read-only git policy refuse
47
+ external-diff/textconv and config injection; subagent children charge their tokens to the parent budget,
48
+ stay isolated from the parent's private state, and write durable state 0600/0700.
49
+
8
50
  ## [0.1.18] — 2026-07-09
9
51
 
10
52
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sliceagent
3
- Version: 0.1.18
3
+ Version: 0.2.0
4
4
  Summary: A coding agent with a new context-engineering framework: bounded, deterministic, reconstructed context (slice architecture) — built for long-horizon work.
5
5
  Author: TT-Wang
6
6
  License-Expression: MIT
@@ -34,15 +34,15 @@ Description-Content-Type: text/markdown
34
34
 
35
35
  [![CI](https://github.com/TT-Wang/sliceagent/actions/workflows/ci.yml/badge.svg)](https://github.com/TT-Wang/sliceagent/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/sliceagent.svg)](https://pypi.org/project/sliceagent/) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)
36
36
 
37
- > **A coding agent that reconstructs a small, exact working context every turn — instead of accumulating a chat transcript and summarizing it when it overflows.**
37
+ > **A coding agent that reconstructs a history-bounded, task-elastic working context every turn — instead of accumulating a chat transcript and summarizing it when it overflows.**
38
38
 
39
- That one change is the whole product. Because context is rebuilt from ground truth each turn rather than piled up:
39
+ That one change is the whole product. Because context is reconstructed from active semantic state and live ground truth each turn rather than piled up:
40
40
 
41
- - **Cheap at scale** — per-turn input stays flat no matter how long the session runs; no grow-to-window sawtooth, so tokens (and cost) don't balloon on long tasks.
42
- - **Less wall-clock** — a small, stable prompt each turn means less to send and less to reason over; long, iterative work finishes faster.
43
- - **No context rot, no compaction** — every turn re-reads the live files and the last error verbatim, so nothing drifts into a lossy summary and there is no history to compact.
41
+ - **History-bounded cost** — when active task state stays stable, per-turn input does not grow merely because the session is older; there is no transcript-driven grow-to-window sawtooth.
42
+ - **Task-elastic focus** — simple tasks stay lean, while real user constraints, coupled files, and unresolved evidence can expand the working slice when needed.
43
+ - **Recoverable live state** — every turn re-observes relevant workspace state and faithfully carries current failures; retired detail pages out behind stable handles instead of forcing routine transcript compaction.
44
44
 
45
- The field's default is *bigger windows + summarize*. sliceagent does the opposite: **remember less, reconstruct precisely.**
45
+ The field's default is *bigger windows + summarize*. sliceagent does the opposite: **carry what remains active; archive and recover the rest.**
46
46
 
47
47
  *Pre-1.0: on `0.x`, CLI flags, config keys, and APIs may change between releases; breaking changes are noted in the [CHANGELOG](CHANGELOG.md).*
48
48
 
@@ -52,17 +52,17 @@ The field's default is *bigger windows + summarize*. sliceagent does the opposit
52
52
 
53
53
  <p align="center">
54
54
  <img src="assets/sliceagent-core-loop.gif" width="840"
55
- alt="The core loop: a transcript agent re-sends its entire growing history every turn (208k to 1.66M tokens over 6 turns), while sliceagent rebuilds a fixed-size seed from the carried slice, live files, and lessons, then seals each turn to disk, and the hippocampus pages past turns back into future seeds on demand — peak input stays ~12-15k, 112x smaller by turn 6. Real per-turn numbers from the s1 benchmark.">
55
+ alt="The core loop: a transcript agent re-sends its entire growing history every turn (208k to 1.66M tokens over 6 turns), while sliceagent rebuilds a history-bounded, task-elastic seed from the carried slice, live files, and lessons, then seals each turn to disk, and the hippocampus pages past turns back into future seeds on demand — peak input stayed ~12-15k in the s1 benchmark, 112x smaller by turn 6.">
56
56
  </p>
57
57
 
58
- sliceagent's memory is organized like a brain: fast, lossy **perception** of the live world; a small **working memory** for the current task; a **hippocampus** that records what just happened; and a **neocortex** that distills durable lessons. Every turn *reconstructs* a bounded working set from these — it never replays a growing transcript.
58
+ sliceagent's memory is organized like a brain: fast, lossy **perception** of the live world; an elastic **working memory** for the current task; a **hippocampus** backed by always-on local artifacts; and an optional **neocortex** that derives durable lessons. Every turn *reconstructs* a history-bounded working set from these — it never replays a growing transcript.
59
59
 
60
60
  | Region | Role |
61
61
  |---|---|
62
- | **Sensory cortex** — live perception | Re-derives the world each turn: git state, project facts, repo map. Never stored or recalled. |
63
- | **Prefrontal cortex** — working memory | The carried **Slice**: bounded, provenance-tagged state (findings, plan, change-set), sealed at each turn boundary. |
64
- | **Hippocampus** — episodic memory | Losslessly records each turn; pages a specific past turn back in on demand. |
65
- | **Neocortex** — long-term memory | Distills successful episodes into durable cross-session lessons, auto-surfaced when relevant. |
62
+ | **Sensory cortex** — live perception | Re-derives the world each turngit state, project facts, repo map—rather than trusting remembered copies. |
63
+ | **Prefrontal cortex** — working memory | The carried **Slice**: task-elastic, provenance-tagged state (intent, findings, plan, change-set), sealed at each turn boundary. |
64
+ | **Hippocampus** — episodic memory | Seals each turn or child report into the always-on local artifact store; pages a specific record back in on demand. |
65
+ | **Neocortex** — long-term memory | Optionally derives and retrieves provenance-tagged cross-session lessons; it is not required for task recovery. |
66
66
 
67
67
  ```text
68
68
  ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
@@ -83,20 +83,20 @@ sliceagent's memory is organized like a brain: fast, lossy **perception** of the
83
83
  └───────────────────────────────────┘
84
84
 
85
85
  ┌─────────────────────────────────────────┐
86
- PFC updated · turn sealed to memory
86
+ PFC updated · turn sealed to artifact
87
87
  └─────────────────────────────────────────┘
88
88
 
89
- ↻ next turn: only the PFC slice carries forward —
90
- everything else re-derives live from disk.
89
+ ↻ next turn: the active slice remains resident;
90
+ live views re-derive, archived detail returns by handle.
91
91
  ```
92
92
 
93
- Each turn faults in exactly what the turn references — the carried slice, live views, and any relevant lessons — and hands the model that bounded **Seed**. The model acts; observations fold back into working memory; at the turn boundary the episode is sealed into the hippocampus; on success the neocortex distills a durable lesson. Net effect: **per-turn context stays flat no matter how long the session runs.**
93
+ Each turn faults in what the active task references — the carried slice, live views, selected artifacts, and any relevant derived lessons — and hands the model an elastic **Seed**. The model acts; observations fold back into working memory; at the turn boundary the episode is sealed into an immutable local artifact and the next checkpoint is published. If semantic memory is available, it may additionally distill a durable lesson. Net effect: **for stable active task state, context does not grow merely with session age; it can still expand with genuine task complexity.**
94
94
 
95
95
  ## Benchmark
96
96
 
97
97
  On public benchmarks, sliceagent matches Codex's solve rate while using 2.5× fewer tokens and 1.3× less cost on ColBench, and up to 149× smaller peak input on long sessions.
98
98
 
99
- Two questions decide whether reconstructing context every turn actually works: does it stay as **capable** as a transcript agent, and does it keep **per-turn cost flat** as a session grows? All three benchmarks are head-to-head vs **OpenAI Codex** on the same model (`gpt-5.5`).
99
+ Two questions decide whether reconstructing context every turn actually works: does it stay as **capable** as a transcript agent, and does it keep **per-turn cost history-bounded as the session grows** — sized to the current task, not the accumulated history? All four benchmarks are head-to-head vs **OpenAI Codex** on the same model (`gpt-5.5`) — the fourth adds a third question: what does it cost to *orchestrate a subagent fleet*.
100
100
 
101
101
  ### 1. In-turn capability — Terminal-Bench 2.0 (public)
102
102
 
@@ -145,7 +145,7 @@ Iterative coding sessions where a transcript really piles up. Each scenario is a
145
145
  | wall · total | **1,069s** | 1,761s | **61%** |
146
146
  | **cost** (cache-aware $) | **$1.30** | $9.43 | **14%** |
147
147
 
148
- Per task note how the transcript agent's peak input scales with the session while the slice stays flat:
148
+ Per task—the transcript agent's peak input scales with the session while the slice remained within a narrow band in these runs:
149
149
 
150
150
  | scenario | agent | solved | peak input | total tokens | wall |
151
151
  |---|---|:--:|--:|--:|--:|
@@ -158,6 +158,32 @@ Per task — note how the transcript agent's peak input scales with the session
158
158
 
159
159
  Same capability — **109–149× smaller peak context, 11.7× fewer tokens, 7.3× cheaper, 1.6× faster.** On `s3`, Codex's transcript reached a **2.44M-token** single-request peak while sliceagent held **16k** — a 149× gap that **widens the longer the session runs.**
160
160
 
161
+ ### 4. Subagent fan-out — hosting a delegation fleet ([`benchmarks/subagent_fanout.py`](benchmarks/subagent_fanout.py))
162
+
163
+ A ColBench-style human-sim (a staff engineer) **explicitly tells both agents to fan out** — one explorer subagent per module across a 6-module service — then asks four parent-only follow-ups: a 6-turn session, 2 fan-out turns + 4 follow-ups. Codex `exec` ships its **own** `spawn_agent` primitive, so **both agents genuinely delegate.** The question isn't who *can* delegate; it's what the **orchestrator** pays to run a fleet. Both `gpt-5.5` at `high`; each agent's own subagent tokens are counted — Codex's child threads recovered from its session rollouts — for a true total-vs-total. **N = 3 runs, mean [min–max]:**
164
+
165
+ | metric | sliceagent | OpenAI Codex | % of Codex |
166
+ |---|--:|--:|:--:|
167
+ | subagent spawns | 14 | 11.7 | both fan out |
168
+ | **orchestrator peak** (largest single request) | **17,362** [15.7k–20.3k] | 362,595 [332k–387k] | **4.8%** |
169
+ | delegated · own children | 341,515 | 568,027 | 60% |
170
+ | **true total** (orchestrator + children) | **610,612** [536k–656k] | 2,235,243 [2.11M–2.32M] | **27%** |
171
+
172
+ Per turn (mean of 3 runs) — the orchestrator's context is what caps how large a fleet you can keep running:
173
+
174
+ | turn | sliceagent orchestrator | OpenAI Codex orchestrator |
175
+ |---|--:|--:|
176
+ | 1 · fan-out | 37,191 | 119,397 |
177
+ | 2 · fan-out | 36,817 | 258,580 |
178
+ | 3 · follow-up | 39,447 | 282,281 |
179
+ | 4 · follow-up | 82,232 | 305,855 |
180
+ | 5 · follow-up | 41,447 | 338,507 |
181
+ | 6 · follow-up | 31,963 | 362,595 |
182
+
183
+ In these runs, sliceagent's orchestrator peak stayed roughly flat because each turn retained active digests and handles rather than child trajectories; its largest single request averaged **~17k** across the six-turn workload. A transcript orchestrator **re-carries the whole session every turn**, so the same delegation-heavy session reached a **~21× larger orchestrator peak and ~3.7× more total tokens** once both agents' children were counted. Parent context does not grow with child trajectory length, though it may still grow when more delegated results are genuinely relevant. Delegation is table stakes; the architectural advantage is durable, re-readable child artifacts plus a history-bounded parent.
184
+
185
+ *N = 3 runs, single model, one opponent, needs the Codex CLI installed. A value-recall sub-check varied wildly run-to-run (sliceagent 1–3 / 3, Codex 0–2 / 3) — it turns on a behavioral re-read choice, so it is within noise and **not** part of the claim. The defensible result is the orchestrator-context and total-token gap, which is structural and held across all three runs (orchestrator 8.8–14.3×, total 3.2–4.3×).*
186
+
161
187
  <details>
162
188
  <summary><b>How the cost numbers are calculated</b> (exact token counts × published rates)</summary>
163
189
 
@@ -194,9 +220,9 @@ One honest wrinkle worth naming: Codex's append-only transcript actually earns a
194
220
 
195
221
  </details>
196
222
 
197
- > The pattern across all three: **capability holds, and the cost gap grows with session length** exactly the flat-per-turn-cost thesis. "Solved" is solution correctness, scored identically for both agents. ColBench is [public](https://huggingface.co/datasets/facebook/collaborative_agent_bench); the long-horizon scenarios are reproducible under [`benchmarks/`](benchmarks/).
223
+ > The pattern across all four is evidence for the **history-bounded-cost thesis in these scenarios**: capability held while per-turn cost tracked the current task rather than accumulated history. The same pattern extended to subagent orchestration. "Solved" is solution correctness, scored identically for both agents. ColBench is [public](https://huggingface.co/datasets/facebook/collaborative_agent_bench); the long-horizon scenarios are reproducible under [`benchmarks/`](benchmarks/).
198
224
  >
199
- > **These are early, small-scale results** — modest task counts (N = 32 / 20 / 3), single trial per task, one model, one opponent. Treat them as a directional signal, not a settled claim. We're actively expanding to larger and more varied test sets, more trials, and more baselines, and will update these numbers as that work lands.
225
+ > **These are early, small-scale results** — modest task counts (N = 32 / 20 / 3 tasks; §4 is one task × 3 runs), single trial per task, one model, one opponent. Treat them as a directional signal, not a settled claim. We're actively expanding to larger and more varied test sets, more trials, and more baselines, and will update these numbers as that work lands.
200
226
 
201
227
  ## Install & quickstart
202
228
 
@@ -212,7 +238,7 @@ curl -fsSL https://raw.githubusercontent.com/TT-Wang/sliceagent/main/install.sh
212
238
  irm https://raw.githubusercontent.com/TT-Wang/sliceagent/main/install.ps1 | iex
213
239
  ```
214
240
 
215
- (Installs `uv` + sliceagent, and Git Bash + ripgrep if you don't have them — the agent's shell commands run under Git Bash, same as other coding agents. Interactive PTY sessions (`terminal_open`) aren't available natively yet; everything else works. Prefer WSL2? The Linux one-liner above works there as-is.)
241
+ (Installs `uv` + sliceagent, and Git Bash + ripgrep if you don't have them — the agent's shell commands run under Git Bash, same as other coding agents. Persistent process and interactive PTY tools are optional and disabled by default everywhere; `AGENT_ADVANCED_TOOLS=1` enables them where supported, but `terminal_open` is not available on native Windows yet. Prefer WSL2? The Linux one-liner above works there as-is.)
216
242
 
217
243
  **The installer handles everything**: `uv`, its own Python 3.12, ripgrep, and sliceagent — in an isolated tool env, no sudo, no prerequisites, no conflict with any Python you already have (conda base at 3.10? Rosetta-Intel conda on an M-series Mac? Doesn't matter). Then just:
218
244
 
@@ -243,13 +269,19 @@ Run `sliceagent` in your project and type what you want in plain language. It re
243
269
  ```text
244
270
  ❯ why does retry_with_backoff drop the last attempt? fix it
245
271
 
246
- 🔍 grep "retry_with_backoff" 📖 read errors.py:40-72 ✎ edit errors.py
272
+ 1 search · 2 read retry.py, tests/test_retry.py
273
+ │ write retry.py
274
+ │ plan 2/3 · add a regression test
275
+ ◌ 2/3 add a regression test · Running pytest -q · 00:12
276
+ │ run pytest -q
277
+ │ 38 passed
278
+ │ ◆ The regression reproduces the bug and passes with the fix.
247
279
  ┌─ assistant ─────────────────────────────────────────────┐
248
280
  │ The loop exits on `attempt == max` before the final │
249
281
  │ sleep+retry, so the last attempt never runs. Changed the │
250
282
  │ bound to `attempt <= max` and added a regression test. │
251
283
  └──────────────────────────────────────────────────────────┘
252
- done · 4 steps · 6.1k tokens
284
+ turn saved · plan 3/3 · 2 passes · 4 read · 1 edit · 1 cmd · 00:18
253
285
  ```
254
286
 
255
287
  Attach a file or path to your message with `@`: `@src/errors.py explain the backoff`.
@@ -261,15 +293,27 @@ Attach a file or path to your message with `@`: `@src/errors.py explain the back
261
293
  | `/config` · `/model` · `/reasoning` | add/switch providers · switch model / reasoning effort (persists) |
262
294
  | `/mode` | permission mode: **baby-sitter** (confirm each edit + command) · **teenager** (default; confirm risky ones) · **let-it-go** (auto-run all but catastrophic) |
263
295
  | `/undo` | revert the last edit(s) |
264
- | `/cwd <path>` | change the workspace root mid-session |
296
+ | `/cwd [path]` | show the fixed workspace root; with a path, show where to relaunch |
265
297
  | `/cost` | tokens and estimated $ spent this session |
266
298
  | `/skills` · `/tools` · `/mcp` · `/plugins` · `/agents` | list what's available to the agent |
267
299
  | `/threads` · `/resume` | switch between, or resume, parked topics |
268
300
  | `/learn <note>` | save a durable lesson yourself |
269
- | `/plan` | draft a plan before it starts editing |
301
+ | `/plan` | show the current task plan |
270
302
  | `Ctrl-C` · `exit` | interrupt the turn · quit |
271
303
 
272
- It can edit code (workspace-confined, reversible with `/undo`), run shell commands and interactive processes through a sandbox (`local` by default, `docker` for full isolation), search the tree and the web, delegate decomposable work to subagents (each on its own bounded slice), and remember lessons across sessions. Three permission modes gate it, all with a hard floor on catastrophic commands; secrets are scrubbed from anything it runs or logs.
304
+ Prefix an unrelated request with `New task:` to start it with fresh task state while parking the current task
305
+ for `/resume`. Ambiguous follow-ups deliberately continue the active task so context is never discarded on a
306
+ guess.
307
+
308
+ It can edit code (workspace-confined, reversible with `/undo`), run regular shell commands through a sandbox (`local` by default, `docker` for full isolation), search the tree and the web, and delegate decomposable research to a fresh one-shot read-only explorer (each child gets its own history-bounded, task-elastic slice). That narrow surface is the demo default. Set `AGENT_ADVANCED_AGENTS=1` to expose writable and named specialist delegation (and nested delegation when `AGENT_SUBAGENT_DEPTH` is raised above its default of `1`), or `AGENT_ADVANCED_TOOLS=1` to expose persistent process and interactive terminal tools. The flags are independent. Three permission modes gate actions, all with a hard floor on catastrophic commands; secrets are scrubbed from anything persisted or logged.
309
+
310
+ Every clean or interrupted agent task turn and every subagent report is sealed into the always-on local artifact/checkpoint path, independently of semantic memory. The model can refine retained detail through the read-only `artifacts/` namespace. Cross-session semantic lessons are a separate, optional derived layer powered by memem; task recovery does not depend on it.
311
+
312
+ If a timeout or disconnect leaves an operation's side effects uncertain, SliceAgent carries a durable,
313
+ target-scoped reconciliation gate into the next turn: it permits matching live read-only inspection, then
314
+ requires an explicit evidence-backed resolution before more effects or task switching in that workspace.
315
+ Opaque shell/code effects also require live user confirmation; a directory listing is never treated as proof
316
+ of file contents. Ambiguous recovery journals stop startup before plugins or MCP processes run.
273
317
 
274
318
  **Configuration.** `sliceagent config --list` prints every setting. Set them persistently in `~/.sliceagent/config.toml` (written by `init`), or override any one via an environment variable:
275
319
 
@@ -279,7 +323,12 @@ It can edit code (workspace-confined, reversible with `/undo`), run shell comman
279
323
  | `AGENT_POLICY` | `teenager` | permission mode |
280
324
  | `AGENT_SANDBOX` | `local` | `local` or `docker` (isolated) |
281
325
  | `AGENT_MAX_STEPS` | `60` | per-turn step ceiling |
282
- | `SLICEAGENT_VAULT` | `~/.sliceagent/vault` | where episodic memory + task state persist (cross-session memory is on by default) |
326
+ | `AGENT_CONTEXT_WINDOW` | *(catalog or unset)* | explicit provider window for strict per-call preflight; unknown models otherwise use compatibility mode |
327
+ | `AGENT_ADVANCED_AGENTS` | *(off)* | enable writable and named specialists; unlock the nested surface subject to the depth ceiling |
328
+ | `AGENT_SUBAGENT_DEPTH` | `1` | delegation depth ceiling; raise it to permit nested advanced agents |
329
+ | `AGENT_ADVANCED_TOOLS` | *(off)* | enable persistent process and interactive terminal tools |
330
+ | `SLICEAGENT_CACHE_DIR` | `~/.sliceagent` | always-on local checkpoints, immutable artifacts, and recovery journals |
331
+ | `SLICEAGENT_VAULT` | `~/.sliceagent/vault` | optional semantic-memory and legacy compatibility records |
283
332
  | `AGENT_VERIFY_CMD` | *(unset)* | test command used as the verification oracle |
284
333
 
285
334
  ## License
@@ -288,7 +337,7 @@ It can edit code (workspace-confined, reversible with `/undo`), run shell comman
288
337
 
289
338
  ## Acknowledgements
290
339
 
291
- sliceagent's design was informed by two excellent open-source agents: **[Hermes](https://github.com/NousResearch/hermes)** (MIT) and **[Kimi Code](https://github.com/MoonshotAI/kimi-code)**. A few peripheral utilities are ported from Hermes (see [NOTICE](NOTICE)); most of the rest are patterns we studied and reimplemented on our own terms. Cross-session memory is powered by [memem](https://github.com/TT-Wang/memem). With thanks to their authors.
340
+ sliceagent's design was informed by two excellent open-source agents: **[Hermes](https://github.com/NousResearch/hermes)** (MIT) and **[Kimi Code](https://github.com/MoonshotAI/kimi-code)**. A few peripheral utilities are ported from Hermes (see [NOTICE](NOTICE)); most of the rest are patterns we studied and reimplemented on our own terms. The optional cross-session semantic-memory layer is powered by [memem](https://github.com/TT-Wang/memem); local artifacts and recovery do not depend on it. With thanks to their authors.
292
341
 
293
342
  ## Contact
294
343
 
@@ -1,6 +1,7 @@
1
1
  # Quickstart
2
2
 
3
- Get from zero to your first completed task in ~5 minutes.
3
+ Get from zero to your first completed task in ~5 minutes. For the architecture behind the CLI, see the
4
+ canonical [Core Design](CORE-DESIGN.md): **history-bounded, task-elastic, and recoverable by construction**.
4
5
 
5
6
  ## 1. Install
6
7
 
@@ -64,10 +65,27 @@ You get an inline prompt with a pinned input box. Type a task — e.g. *"add a `
64
65
  test for it"* — and watch it work. The conversation stays in your normal terminal scrollback, so
65
66
  **select + copy/paste and scroll work natively** on any terminal (including macOS Terminal.app).
66
67
 
68
+ The demo defaults to the narrow core: the parent can edit and run regular commands, while delegation creates
69
+ a fresh, one-shot, read-only explorer. Advanced surfaces are explicit opt-ins:
70
+
71
+ ```bash
72
+ export AGENT_ADVANCED_AGENTS=1 # writable and named specialists; nesting uses AGENT_SUBAGENT_DEPTH
73
+ export AGENT_ADVANCED_TOOLS=1 # persistent processes and interactive terminal/PTY tools
74
+ ```
75
+
76
+ The flags are independent; leave either unset to keep that surface out of the model's tool set. Delegation
77
+ depth defaults to `1`; raise `AGENT_SUBAGENT_DEPTH` only if you intentionally want advanced agents to spawn
78
+ children. Local checkpoints and immutable turn/subagent artifacts are always on and can be read through
79
+ `artifacts/`. Semantic cross-session lessons are an optional derived layer; recovery does not depend on them.
80
+ An uncertain timeout parks the task and gates further effects until the agent re-observes every affected
81
+ live target and records reconciliation; unrelated reads cannot clear the gate, and opaque effects require
82
+ live user confirmation.
83
+
67
84
  Useful keys & commands:
68
85
 
69
86
  - **Enter** sends · **Ctrl-J** inserts a newline · **Ctrl-C** aborts the current turn · **Ctrl-D** quits.
70
87
  - `/help` lists slash commands · `/plan` shows the agent's plan · `/threads` lists topics · `/exit` quits.
88
+ - Start an unrelated task explicitly with `New task: ...`; the current task is parked for `/resume`.
71
89
 
72
90
  UI modes (via `AGENT_TUI`): `rich` (default, inline) · `live` (always-pinned box, streams above it) ·
73
91
  `off` (plain stdout, good for pipes/CI).
@@ -75,9 +93,12 @@ UI modes (via `AGENT_TUI`): `rich` (default, inline) · `live` (always-pinned bo
75
93
  ## 4. Reading the output
76
94
 
77
95
  The status bar reads `model · net · policy · Σ tokens · fresh`. The **fresh** number is the one to watch:
78
- it's the per-turn non-cached input cost, and sliceagent's whole design keeps it flat as a session grows.
96
+ it's the per-turn non-cached input cost. With active task state held stable, it does not grow merely because
97
+ the session is older; it can still expand when the task gains genuine constraints, files, or evidence.
79
98
 
80
99
  ## Troubleshooting
81
100
 
82
101
  Common snags: no API key (run `sliceagent init`), `rg` (ripgrep) not installed, or an MCP server that fails to
83
- start. `sliceagent config --list` shows every setting and its current value.
102
+ start. For a model whose context window is not in the catalog, set `AGENT_CONTEXT_WINDOW` to its documented
103
+ token limit to enable strict per-call capacity rejection; leaving it unset uses the explicit compatibility
104
+ mode. `sliceagent config --list` shows every setting and its current value.
@@ -2,15 +2,15 @@
2
2
 
3
3
  [![CI](https://github.com/TT-Wang/sliceagent/actions/workflows/ci.yml/badge.svg)](https://github.com/TT-Wang/sliceagent/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/sliceagent.svg)](https://pypi.org/project/sliceagent/) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](pyproject.toml)
4
4
 
5
- > **A coding agent that reconstructs a small, exact working context every turn — instead of accumulating a chat transcript and summarizing it when it overflows.**
5
+ > **A coding agent that reconstructs a history-bounded, task-elastic working context every turn — instead of accumulating a chat transcript and summarizing it when it overflows.**
6
6
 
7
- That one change is the whole product. Because context is rebuilt from ground truth each turn rather than piled up:
7
+ That one change is the whole product. Because context is reconstructed from active semantic state and live ground truth each turn rather than piled up:
8
8
 
9
- - **Cheap at scale** — per-turn input stays flat no matter how long the session runs; no grow-to-window sawtooth, so tokens (and cost) don't balloon on long tasks.
10
- - **Less wall-clock** — a small, stable prompt each turn means less to send and less to reason over; long, iterative work finishes faster.
11
- - **No context rot, no compaction** — every turn re-reads the live files and the last error verbatim, so nothing drifts into a lossy summary and there is no history to compact.
9
+ - **History-bounded cost** — when active task state stays stable, per-turn input does not grow merely because the session is older; there is no transcript-driven grow-to-window sawtooth.
10
+ - **Task-elastic focus** — simple tasks stay lean, while real user constraints, coupled files, and unresolved evidence can expand the working slice when needed.
11
+ - **Recoverable live state** — every turn re-observes relevant workspace state and faithfully carries current failures; retired detail pages out behind stable handles instead of forcing routine transcript compaction.
12
12
 
13
- The field's default is *bigger windows + summarize*. sliceagent does the opposite: **remember less, reconstruct precisely.**
13
+ The field's default is *bigger windows + summarize*. sliceagent does the opposite: **carry what remains active; archive and recover the rest.**
14
14
 
15
15
  *Pre-1.0: on `0.x`, CLI flags, config keys, and APIs may change between releases; breaking changes are noted in the [CHANGELOG](CHANGELOG.md).*
16
16
 
@@ -20,17 +20,17 @@ The field's default is *bigger windows + summarize*. sliceagent does the opposit
20
20
 
21
21
  <p align="center">
22
22
  <img src="assets/sliceagent-core-loop.gif" width="840"
23
- alt="The core loop: a transcript agent re-sends its entire growing history every turn (208k to 1.66M tokens over 6 turns), while sliceagent rebuilds a fixed-size seed from the carried slice, live files, and lessons, then seals each turn to disk, and the hippocampus pages past turns back into future seeds on demand — peak input stays ~12-15k, 112x smaller by turn 6. Real per-turn numbers from the s1 benchmark.">
23
+ alt="The core loop: a transcript agent re-sends its entire growing history every turn (208k to 1.66M tokens over 6 turns), while sliceagent rebuilds a history-bounded, task-elastic seed from the carried slice, live files, and lessons, then seals each turn to disk, and the hippocampus pages past turns back into future seeds on demand — peak input stayed ~12-15k in the s1 benchmark, 112x smaller by turn 6.">
24
24
  </p>
25
25
 
26
- sliceagent's memory is organized like a brain: fast, lossy **perception** of the live world; a small **working memory** for the current task; a **hippocampus** that records what just happened; and a **neocortex** that distills durable lessons. Every turn *reconstructs* a bounded working set from these — it never replays a growing transcript.
26
+ sliceagent's memory is organized like a brain: fast, lossy **perception** of the live world; an elastic **working memory** for the current task; a **hippocampus** backed by always-on local artifacts; and an optional **neocortex** that derives durable lessons. Every turn *reconstructs* a history-bounded working set from these — it never replays a growing transcript.
27
27
 
28
28
  | Region | Role |
29
29
  |---|---|
30
- | **Sensory cortex** — live perception | Re-derives the world each turn: git state, project facts, repo map. Never stored or recalled. |
31
- | **Prefrontal cortex** — working memory | The carried **Slice**: bounded, provenance-tagged state (findings, plan, change-set), sealed at each turn boundary. |
32
- | **Hippocampus** — episodic memory | Losslessly records each turn; pages a specific past turn back in on demand. |
33
- | **Neocortex** — long-term memory | Distills successful episodes into durable cross-session lessons, auto-surfaced when relevant. |
30
+ | **Sensory cortex** — live perception | Re-derives the world each turngit state, project facts, repo map—rather than trusting remembered copies. |
31
+ | **Prefrontal cortex** — working memory | The carried **Slice**: task-elastic, provenance-tagged state (intent, findings, plan, change-set), sealed at each turn boundary. |
32
+ | **Hippocampus** — episodic memory | Seals each turn or child report into the always-on local artifact store; pages a specific record back in on demand. |
33
+ | **Neocortex** — long-term memory | Optionally derives and retrieves provenance-tagged cross-session lessons; it is not required for task recovery. |
34
34
 
35
35
  ```text
36
36
  ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
@@ -51,20 +51,20 @@ sliceagent's memory is organized like a brain: fast, lossy **perception** of the
51
51
  └───────────────────────────────────┘
52
52
 
53
53
  ┌─────────────────────────────────────────┐
54
- PFC updated · turn sealed to memory
54
+ PFC updated · turn sealed to artifact
55
55
  └─────────────────────────────────────────┘
56
56
 
57
- ↻ next turn: only the PFC slice carries forward —
58
- everything else re-derives live from disk.
57
+ ↻ next turn: the active slice remains resident;
58
+ live views re-derive, archived detail returns by handle.
59
59
  ```
60
60
 
61
- Each turn faults in exactly what the turn references — the carried slice, live views, and any relevant lessons — and hands the model that bounded **Seed**. The model acts; observations fold back into working memory; at the turn boundary the episode is sealed into the hippocampus; on success the neocortex distills a durable lesson. Net effect: **per-turn context stays flat no matter how long the session runs.**
61
+ Each turn faults in what the active task references — the carried slice, live views, selected artifacts, and any relevant derived lessons — and hands the model an elastic **Seed**. The model acts; observations fold back into working memory; at the turn boundary the episode is sealed into an immutable local artifact and the next checkpoint is published. If semantic memory is available, it may additionally distill a durable lesson. Net effect: **for stable active task state, context does not grow merely with session age; it can still expand with genuine task complexity.**
62
62
 
63
63
  ## Benchmark
64
64
 
65
65
  On public benchmarks, sliceagent matches Codex's solve rate while using 2.5× fewer tokens and 1.3× less cost on ColBench, and up to 149× smaller peak input on long sessions.
66
66
 
67
- Two questions decide whether reconstructing context every turn actually works: does it stay as **capable** as a transcript agent, and does it keep **per-turn cost flat** as a session grows? All three benchmarks are head-to-head vs **OpenAI Codex** on the same model (`gpt-5.5`).
67
+ Two questions decide whether reconstructing context every turn actually works: does it stay as **capable** as a transcript agent, and does it keep **per-turn cost history-bounded as the session grows** — sized to the current task, not the accumulated history? All four benchmarks are head-to-head vs **OpenAI Codex** on the same model (`gpt-5.5`) — the fourth adds a third question: what does it cost to *orchestrate a subagent fleet*.
68
68
 
69
69
  ### 1. In-turn capability — Terminal-Bench 2.0 (public)
70
70
 
@@ -113,7 +113,7 @@ Iterative coding sessions where a transcript really piles up. Each scenario is a
113
113
  | wall · total | **1,069s** | 1,761s | **61%** |
114
114
  | **cost** (cache-aware $) | **$1.30** | $9.43 | **14%** |
115
115
 
116
- Per task note how the transcript agent's peak input scales with the session while the slice stays flat:
116
+ Per task—the transcript agent's peak input scales with the session while the slice remained within a narrow band in these runs:
117
117
 
118
118
  | scenario | agent | solved | peak input | total tokens | wall |
119
119
  |---|---|:--:|--:|--:|--:|
@@ -126,6 +126,32 @@ Per task — note how the transcript agent's peak input scales with the session
126
126
 
127
127
  Same capability — **109–149× smaller peak context, 11.7× fewer tokens, 7.3× cheaper, 1.6× faster.** On `s3`, Codex's transcript reached a **2.44M-token** single-request peak while sliceagent held **16k** — a 149× gap that **widens the longer the session runs.**
128
128
 
129
+ ### 4. Subagent fan-out — hosting a delegation fleet ([`benchmarks/subagent_fanout.py`](benchmarks/subagent_fanout.py))
130
+
131
+ A ColBench-style human-sim (a staff engineer) **explicitly tells both agents to fan out** — one explorer subagent per module across a 6-module service — then asks four parent-only follow-ups: a 6-turn session, 2 fan-out turns + 4 follow-ups. Codex `exec` ships its **own** `spawn_agent` primitive, so **both agents genuinely delegate.** The question isn't who *can* delegate; it's what the **orchestrator** pays to run a fleet. Both `gpt-5.5` at `high`; each agent's own subagent tokens are counted — Codex's child threads recovered from its session rollouts — for a true total-vs-total. **N = 3 runs, mean [min–max]:**
132
+
133
+ | metric | sliceagent | OpenAI Codex | % of Codex |
134
+ |---|--:|--:|:--:|
135
+ | subagent spawns | 14 | 11.7 | both fan out |
136
+ | **orchestrator peak** (largest single request) | **17,362** [15.7k–20.3k] | 362,595 [332k–387k] | **4.8%** |
137
+ | delegated · own children | 341,515 | 568,027 | 60% |
138
+ | **true total** (orchestrator + children) | **610,612** [536k–656k] | 2,235,243 [2.11M–2.32M] | **27%** |
139
+
140
+ Per turn (mean of 3 runs) — the orchestrator's context is what caps how large a fleet you can keep running:
141
+
142
+ | turn | sliceagent orchestrator | OpenAI Codex orchestrator |
143
+ |---|--:|--:|
144
+ | 1 · fan-out | 37,191 | 119,397 |
145
+ | 2 · fan-out | 36,817 | 258,580 |
146
+ | 3 · follow-up | 39,447 | 282,281 |
147
+ | 4 · follow-up | 82,232 | 305,855 |
148
+ | 5 · follow-up | 41,447 | 338,507 |
149
+ | 6 · follow-up | 31,963 | 362,595 |
150
+
151
+ In these runs, sliceagent's orchestrator peak stayed roughly flat because each turn retained active digests and handles rather than child trajectories; its largest single request averaged **~17k** across the six-turn workload. A transcript orchestrator **re-carries the whole session every turn**, so the same delegation-heavy session reached a **~21× larger orchestrator peak and ~3.7× more total tokens** once both agents' children were counted. Parent context does not grow with child trajectory length, though it may still grow when more delegated results are genuinely relevant. Delegation is table stakes; the architectural advantage is durable, re-readable child artifacts plus a history-bounded parent.
152
+
153
+ *N = 3 runs, single model, one opponent, needs the Codex CLI installed. A value-recall sub-check varied wildly run-to-run (sliceagent 1–3 / 3, Codex 0–2 / 3) — it turns on a behavioral re-read choice, so it is within noise and **not** part of the claim. The defensible result is the orchestrator-context and total-token gap, which is structural and held across all three runs (orchestrator 8.8–14.3×, total 3.2–4.3×).*
154
+
129
155
  <details>
130
156
  <summary><b>How the cost numbers are calculated</b> (exact token counts × published rates)</summary>
131
157
 
@@ -162,9 +188,9 @@ One honest wrinkle worth naming: Codex's append-only transcript actually earns a
162
188
 
163
189
  </details>
164
190
 
165
- > The pattern across all three: **capability holds, and the cost gap grows with session length** exactly the flat-per-turn-cost thesis. "Solved" is solution correctness, scored identically for both agents. ColBench is [public](https://huggingface.co/datasets/facebook/collaborative_agent_bench); the long-horizon scenarios are reproducible under [`benchmarks/`](benchmarks/).
191
+ > The pattern across all four is evidence for the **history-bounded-cost thesis in these scenarios**: capability held while per-turn cost tracked the current task rather than accumulated history. The same pattern extended to subagent orchestration. "Solved" is solution correctness, scored identically for both agents. ColBench is [public](https://huggingface.co/datasets/facebook/collaborative_agent_bench); the long-horizon scenarios are reproducible under [`benchmarks/`](benchmarks/).
166
192
  >
167
- > **These are early, small-scale results** — modest task counts (N = 32 / 20 / 3), single trial per task, one model, one opponent. Treat them as a directional signal, not a settled claim. We're actively expanding to larger and more varied test sets, more trials, and more baselines, and will update these numbers as that work lands.
193
+ > **These are early, small-scale results** — modest task counts (N = 32 / 20 / 3 tasks; §4 is one task × 3 runs), single trial per task, one model, one opponent. Treat them as a directional signal, not a settled claim. We're actively expanding to larger and more varied test sets, more trials, and more baselines, and will update these numbers as that work lands.
168
194
 
169
195
  ## Install & quickstart
170
196
 
@@ -180,7 +206,7 @@ curl -fsSL https://raw.githubusercontent.com/TT-Wang/sliceagent/main/install.sh
180
206
  irm https://raw.githubusercontent.com/TT-Wang/sliceagent/main/install.ps1 | iex
181
207
  ```
182
208
 
183
- (Installs `uv` + sliceagent, and Git Bash + ripgrep if you don't have them — the agent's shell commands run under Git Bash, same as other coding agents. Interactive PTY sessions (`terminal_open`) aren't available natively yet; everything else works. Prefer WSL2? The Linux one-liner above works there as-is.)
209
+ (Installs `uv` + sliceagent, and Git Bash + ripgrep if you don't have them — the agent's shell commands run under Git Bash, same as other coding agents. Persistent process and interactive PTY tools are optional and disabled by default everywhere; `AGENT_ADVANCED_TOOLS=1` enables them where supported, but `terminal_open` is not available on native Windows yet. Prefer WSL2? The Linux one-liner above works there as-is.)
184
210
 
185
211
  **The installer handles everything**: `uv`, its own Python 3.12, ripgrep, and sliceagent — in an isolated tool env, no sudo, no prerequisites, no conflict with any Python you already have (conda base at 3.10? Rosetta-Intel conda on an M-series Mac? Doesn't matter). Then just:
186
212
 
@@ -211,13 +237,19 @@ Run `sliceagent` in your project and type what you want in plain language. It re
211
237
  ```text
212
238
  ❯ why does retry_with_backoff drop the last attempt? fix it
213
239
 
214
- 🔍 grep "retry_with_backoff" 📖 read errors.py:40-72 ✎ edit errors.py
240
+ 1 search · 2 read retry.py, tests/test_retry.py
241
+ │ write retry.py
242
+ │ plan 2/3 · add a regression test
243
+ ◌ 2/3 add a regression test · Running pytest -q · 00:12
244
+ │ run pytest -q
245
+ │ 38 passed
246
+ │ ◆ The regression reproduces the bug and passes with the fix.
215
247
  ┌─ assistant ─────────────────────────────────────────────┐
216
248
  │ The loop exits on `attempt == max` before the final │
217
249
  │ sleep+retry, so the last attempt never runs. Changed the │
218
250
  │ bound to `attempt <= max` and added a regression test. │
219
251
  └──────────────────────────────────────────────────────────┘
220
- done · 4 steps · 6.1k tokens
252
+ turn saved · plan 3/3 · 2 passes · 4 read · 1 edit · 1 cmd · 00:18
221
253
  ```
222
254
 
223
255
  Attach a file or path to your message with `@`: `@src/errors.py explain the backoff`.
@@ -229,15 +261,27 @@ Attach a file or path to your message with `@`: `@src/errors.py explain the back
229
261
  | `/config` · `/model` · `/reasoning` | add/switch providers · switch model / reasoning effort (persists) |
230
262
  | `/mode` | permission mode: **baby-sitter** (confirm each edit + command) · **teenager** (default; confirm risky ones) · **let-it-go** (auto-run all but catastrophic) |
231
263
  | `/undo` | revert the last edit(s) |
232
- | `/cwd <path>` | change the workspace root mid-session |
264
+ | `/cwd [path]` | show the fixed workspace root; with a path, show where to relaunch |
233
265
  | `/cost` | tokens and estimated $ spent this session |
234
266
  | `/skills` · `/tools` · `/mcp` · `/plugins` · `/agents` | list what's available to the agent |
235
267
  | `/threads` · `/resume` | switch between, or resume, parked topics |
236
268
  | `/learn <note>` | save a durable lesson yourself |
237
- | `/plan` | draft a plan before it starts editing |
269
+ | `/plan` | show the current task plan |
238
270
  | `Ctrl-C` · `exit` | interrupt the turn · quit |
239
271
 
240
- It can edit code (workspace-confined, reversible with `/undo`), run shell commands and interactive processes through a sandbox (`local` by default, `docker` for full isolation), search the tree and the web, delegate decomposable work to subagents (each on its own bounded slice), and remember lessons across sessions. Three permission modes gate it, all with a hard floor on catastrophic commands; secrets are scrubbed from anything it runs or logs.
272
+ Prefix an unrelated request with `New task:` to start it with fresh task state while parking the current task
273
+ for `/resume`. Ambiguous follow-ups deliberately continue the active task so context is never discarded on a
274
+ guess.
275
+
276
+ It can edit code (workspace-confined, reversible with `/undo`), run regular shell commands through a sandbox (`local` by default, `docker` for full isolation), search the tree and the web, and delegate decomposable research to a fresh one-shot read-only explorer (each child gets its own history-bounded, task-elastic slice). That narrow surface is the demo default. Set `AGENT_ADVANCED_AGENTS=1` to expose writable and named specialist delegation (and nested delegation when `AGENT_SUBAGENT_DEPTH` is raised above its default of `1`), or `AGENT_ADVANCED_TOOLS=1` to expose persistent process and interactive terminal tools. The flags are independent. Three permission modes gate actions, all with a hard floor on catastrophic commands; secrets are scrubbed from anything persisted or logged.
277
+
278
+ Every clean or interrupted agent task turn and every subagent report is sealed into the always-on local artifact/checkpoint path, independently of semantic memory. The model can refine retained detail through the read-only `artifacts/` namespace. Cross-session semantic lessons are a separate, optional derived layer powered by memem; task recovery does not depend on it.
279
+
280
+ If a timeout or disconnect leaves an operation's side effects uncertain, SliceAgent carries a durable,
281
+ target-scoped reconciliation gate into the next turn: it permits matching live read-only inspection, then
282
+ requires an explicit evidence-backed resolution before more effects or task switching in that workspace.
283
+ Opaque shell/code effects also require live user confirmation; a directory listing is never treated as proof
284
+ of file contents. Ambiguous recovery journals stop startup before plugins or MCP processes run.
241
285
 
242
286
  **Configuration.** `sliceagent config --list` prints every setting. Set them persistently in `~/.sliceagent/config.toml` (written by `init`), or override any one via an environment variable:
243
287
 
@@ -247,7 +291,12 @@ It can edit code (workspace-confined, reversible with `/undo`), run shell comman
247
291
  | `AGENT_POLICY` | `teenager` | permission mode |
248
292
  | `AGENT_SANDBOX` | `local` | `local` or `docker` (isolated) |
249
293
  | `AGENT_MAX_STEPS` | `60` | per-turn step ceiling |
250
- | `SLICEAGENT_VAULT` | `~/.sliceagent/vault` | where episodic memory + task state persist (cross-session memory is on by default) |
294
+ | `AGENT_CONTEXT_WINDOW` | *(catalog or unset)* | explicit provider window for strict per-call preflight; unknown models otherwise use compatibility mode |
295
+ | `AGENT_ADVANCED_AGENTS` | *(off)* | enable writable and named specialists; unlock the nested surface subject to the depth ceiling |
296
+ | `AGENT_SUBAGENT_DEPTH` | `1` | delegation depth ceiling; raise it to permit nested advanced agents |
297
+ | `AGENT_ADVANCED_TOOLS` | *(off)* | enable persistent process and interactive terminal tools |
298
+ | `SLICEAGENT_CACHE_DIR` | `~/.sliceagent` | always-on local checkpoints, immutable artifacts, and recovery journals |
299
+ | `SLICEAGENT_VAULT` | `~/.sliceagent/vault` | optional semantic-memory and legacy compatibility records |
251
300
  | `AGENT_VERIFY_CMD` | *(unset)* | test command used as the verification oracle |
252
301
 
253
302
  ## License
@@ -256,7 +305,7 @@ It can edit code (workspace-confined, reversible with `/undo`), run shell comman
256
305
 
257
306
  ## Acknowledgements
258
307
 
259
- sliceagent's design was informed by two excellent open-source agents: **[Hermes](https://github.com/NousResearch/hermes)** (MIT) and **[Kimi Code](https://github.com/MoonshotAI/kimi-code)**. A few peripheral utilities are ported from Hermes (see [NOTICE](NOTICE)); most of the rest are patterns we studied and reimplemented on our own terms. Cross-session memory is powered by [memem](https://github.com/TT-Wang/memem). With thanks to their authors.
308
+ sliceagent's design was informed by two excellent open-source agents: **[Hermes](https://github.com/NousResearch/hermes)** (MIT) and **[Kimi Code](https://github.com/MoonshotAI/kimi-code)**. A few peripheral utilities are ported from Hermes (see [NOTICE](NOTICE)); most of the rest are patterns we studied and reimplemented on our own terms. The optional cross-session semantic-memory layer is powered by [memem](https://github.com/TT-Wang/memem); local artifacts and recovery do not depend on it. With thanks to their authors.
260
309
 
261
310
  ## Contact
262
311
 
@@ -16,7 +16,9 @@ Each folder has: `meta.json` (turns, step cap, notes), `prompts.json` (the order
16
16
 
17
17
  ## Run it
18
18
 
19
- Needs `pip install "sliceagent[tui]"` and an LLM configured (`sliceagent init`, or export `LLM_API_KEY` + `AGENT_MODEL`).
19
+ Needs `pip install "sliceagent[tui]"` and an LLM configured (`sliceagent init`, or export `LLM_API_KEY` +
20
+ `AGENT_MODEL`). The runner uses the same env-over-config provider resolution as the app, preserves one stable
21
+ task objective across turns, and seals turn-local runtime state after every prompt.
20
22
 
21
23
  ```bash
22
24
  python benchmarks/run.py # all three
@@ -38,3 +40,14 @@ It drives sliceagent over each scenario's turns, scores the final repo with `ver
38
40
  | wall (total) | **1,069s** | 1,761s | **61%** |
39
41
 
40
42
  On `s3` (10 turns), Codex's transcript reached a **2.44M-token** single-request peak while sliceagent held **16k** — a 149× gap that widens with session length. See [`README.md`](../README.md#benchmark) for the full picture including the public [ColBench](https://huggingface.co/datasets/facebook/collaborative_agent_bench) run.
43
+
44
+ ## Subagent fan-out (README §4) — `subagent_fanout.py`
45
+
46
+ A separate head-to-head where a ColBench-style human-sim tells **both** agents to fan out (one explorer subagent per module) then asks parent-only follow-ups over a 6-turn session. Both agents delegate (Codex has its own `spawn_agent`); the question is what the **orchestrator** pays to run a fleet. Each agent's own subagent tokens are counted — Codex's child threads are recovered from its `~/.codex/sessions` rollout files — for a true total-vs-total. Needs the **Codex CLI installed + logged in** in addition to a configured LLM.
47
+
48
+ ```bash
49
+ ARCH_MODE=humansim AGENT_REASONING=high CODEX_EFFORT=high \
50
+ ARCH_RUNS=3 python benchmarks/subagent_fanout.py # 3 runs + aggregate
51
+ ```
52
+
53
+ Result (N=3): sliceagent's **orchestrator peak stays ~17k while Codex's climbs to ~360k** (it re-carries the whole transcript each turn), for **~21× smaller orchestrator peak and ~3.7× lower true total** on a delegation-heavy session. See [`README.md` §4](../README.md#benchmark) for the table and caveats.