Commit d267970
authored
Fix empty tool_output in transcripts for subagent tools (#179)
* Enable keyword detection on first message using direct parts transformation
Previously, first messages were skipped entirely to avoid interfering with title generation.
Now, keywords detected on the first message are injected directly into the message parts
instead of using the hook message injection system, allowing keywords like 'ultrawork' to
activate on the first message of a session.
This change:
- Removes the early return that skipped first message keyword detection
- Moves keyword context generation before the isFirstMessage check
- For first messages: transforms message parts directly by prepending keyword context
- For subsequent messages: maintains existing hook message injection behavior
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* Preserve agent context in preemptive compaction's continue message
When sending the 'Continue' message after compaction, now includes the
original agent parameter from the stored message. Previously, the Continue
message was sent without the agent parameter, causing OpenCode to use the
default 'build' agent instead of preserving the original agent context
(e.g., Sisyphus).
Implementation:
- Get messageDir using getMessageDir(sessionID)
- Retrieve storedMessage using findNearestMessageWithFields
- Pass agent: storedMessage?.agent to promptAsync body
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
* Fix tool_result recording for call_omo_agent to include output in transcripts (#177)
- Check if metadata is empty before using it
- Wrap output.output in structured object when metadata is missing
- Ensures plugin tools (call_omo_agent, background_task, task) that return strings are properly recorded in transcripts instead of empty {}
🤖 Generated with assistance of OhMyOpenCode1 parent 17ccf6b commit d267970
3 files changed
+27
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | | - | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
0 commit comments