extract_text() is new in s06 (listed in the docstring under "Changes
from s05") but was defined under the "FROM s02-s05 (unchanged)" banner.
Move it into the "NEW in s06: Subagent" section, directly above its only
caller spawn_subagent(). Pure move, no logic change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The problem block used a nested `if block.type == "tool_use":` while the
solution block and code.py use `if block.type != "tool_use": continue`.
This made the problem->solution diff show two changes instead of the one
the section teaches (the README states only one place in the loop changed).
Align all three README variants (zh/en/ja) to the early-continue idiom.
The compact tool schema declares a "focus" parameter ("What to preserve
in the summary") but the handler ignored it entirely -- the parameter
was never passed to auto_compact(). Now the focus value is captured from
block.input and included in the summarization prompt so the LLM knows
what details to prioritize when compressing the conversation.
s09_agent_teams.py, s10_team_protocols.py, and s11_autonomous_agents.py
were missing the "> /dev/" entry in their dangerous command blocklist.
This is present in s01, s06, s12, and s_full but was dropped when s09-s11
were written, creating a security regression where commands like
`echo y > /dev/sda` could bypass the blocklist.
Resolves the contradiction between "Agent is the model" and
"Model is the driver, Harness is the vehicle". All three language
versions now clearly distinguish: agency comes from training,
but a working agent product = model + harness.
Adjust the philosophical framing to resolve the contradiction between
"Agent is the model" and "Model is the driver, Harness is the vehicle".
Now clearly distinguishes: agency comes from training (not coded),
but a working agent product = model + harness.
- agents/s01_agent_loop.py: Add FileNotFoundError/OSError handling in run_bash()
- agents/s04_subagent.py: Same fix + use .get() for block.input['prompt']
(consistent with .get() already used for 'description' on line 157)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two issues found during post-merge audit:
1. auto_compact used [:80000] (oldest) instead of [-80000:] (newest), inconsistent with s06
2. nag reminder used insert(0,...) instead of append(), inconsistent with s03
Skip compacting read_file tool outputs since they are reference material.
Compacting them into placeholders forces the agent to re-read the same
files, creating loops. Other tool results are still compacted normally.
Add double-checked validation inside _claim_lock: verify task owner,
status, and blockedBy before claiming. Check claim_task return value
in idle loop to skip failed claims.
Remove unused blocks field and add_blocks parameter. The LLM never
used add_blocks in practice, making it dead code that taught a
misleading bidirectional pattern. Replace with remove_blocked_by
for dependency rewiring. Single-source-of-truth with blockedBy only.
Extends the readability fix from PR #128 (s02) to all remaining sessions.
Tool name and output are now on separate lines, consistent with s01's
existing pattern and improving readability for multi-line tool output.