Skip to content

Continue conversation after Assist tool calls#4

Merged
itsreverence merged 1 commit into
mainfrom
fix/continue-after-tool-call-results
Jun 12, 2026
Merged

Continue conversation after Assist tool calls#4
itsreverence merged 1 commit into
mainfrom
fix/continue-after-tool-call-results

Conversation

@itsreverence

@itsreverence itsreverence commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Track whether a Codex streaming turn requested a Home Assistant tool call.
  • Continue the conversation loop after tool calls so the model sees returned tool results and produces the final answer in the same Assist turn.
  • Keep existing stop behavior for turns that only stream text.

Why

Home Assistant may consume/store script tool results immediately, leaving chat_log.unresponded_tool_results empty by the time Codex Assist checks it. In that case Codex Assist stopped after the tool call and the UI stayed at ... until the next user message.

Tracking whether the model requested a tool call during the stream is the better signal that a follow-up model pass is needed.

Verification

  • uv run ruff check .
  • uv run pytest -q

@itsreverence

Copy link
Copy Markdown
Owner Author

Review note: I reviewed the tool-call loop fix and reran local verification. The change is narrowly scoped: it keeps text-only turns stopping normally, but uses the streamed tool-call event as the signal to continue into the follow-up model pass after HA returns tool results. CI is green and local ruff/tests pass.

@itsreverence
itsreverence merged commit 69c8397 into main Jun 12, 2026
3 checks passed
@itsreverence
itsreverence deleted the fix/continue-after-tool-call-results branch June 12, 2026 00:13
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