Skip to content

Fix KeyError when implementing small issues#53

Merged
max-tet merged 2 commits intomainfrom
fix/small-issue-implement-crash
Mar 24, 2026
Merged

Fix KeyError when implementing small issues#53
max-tet merged 2 commits intomainfrom
fix/small-issue-implement-crash

Conversation

@max-tet
Copy link
Copy Markdown
Collaborator

@max-tet max-tet commented Mar 24, 2026

Summary

  • Small issues (size=small) skip thorough planning and go directly from preliminary plan approval to implementation
  • implement.run unconditionally read issue_state["plan_comment_id"], which doesn't exist for small issues — only preliminary_comment_id is set
  • Changed to issue_state.get("plan_comment_id") or issue_state["preliminary_comment_id"] so it falls back correctly
  • This caused Allow multi-upload of custom apps FreeshardBase/web-terminal#10 to fail with KeyError: 'plan_comment_id'

Test plan

  • Added test confirming _prepare_implementation_context uses preliminary_comment_id when plan_comment_id is absent
  • All 283 existing tests pass

🤖 Generated with Claude Code

MagicMock/mock.effective_git_name/139641991453328 and others added 2 commits March 22, 2026 20:47
Timeouts were misclassified as UsageLimitError, causing false "usage
limit hit" log messages and — for CLI backend — losing all session
state so retries started from scratch. This introduces
InvocationTimeoutError as a separate exception and ensures conversation
state is saved before the timeout propagates:

- API backend: catch TimeoutError, save conversation + commit WIP
- CLI backend: pre-generate session ID via --session-id and save it
  before subprocess.run, so it survives timeouts
- Task files: catch InvocationTimeoutError with accurate log messages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Small issues go directly from preliminary plan approval to implementation,
but implement.run unconditionally read issue_state["plan_comment_id"] which
doesn't exist for small issues. Fall back to preliminary_comment_id.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@max-tet max-tet merged commit e564e6d into main Mar 24, 2026
2 checks passed
@max-tet max-tet deleted the fix/small-issue-implement-crash branch March 24, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant