Every so often, at least once per day, the agent/model starts returning weird stuff. #3555

Closed
opened 2026-02-16 17:40:38 -05:00 by yindo · 11 comments
Owner

Originally created by @tebayoso on GitHub (Dec 15, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Hi,
This is something weird, but since it happened three times already, I want to report it in case it's relevant. Feels to me like the agent or the model might be injected with some weird code/repo, and is causing the output or reasoning to become giberish.

OpenCode version

1.0.153

Steps to reproduce

I don't think there's an specific flow. What I noticed is that this happens to Copilot Model.

Screenshot and/or share link

Image Image Image Image Image Image

Operating System

MACOS 26.2

Terminal

Warp Terminal

Originally created by @tebayoso on GitHub (Dec 15, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Hi, This is something weird, but since it happened three times already, I want to report it in case it's relevant. Feels to me like the agent or the model might be injected with some weird code/repo, and is causing the output or reasoning to become giberish. ### OpenCode version 1.0.153 ### Steps to reproduce I don't think there's an specific flow. What I noticed is that this happens to Copilot Model. ### Screenshot and/or share link <img width="923" height="609" alt="Image" src="https://github.com/user-attachments/assets/21633dd5-79bf-492d-afd5-6c4709d78ef2" /> <img width="883" height="1292" alt="Image" src="https://github.com/user-attachments/assets/ffe6c9f6-b660-437c-bdae-377f99b1abd5" /> <img width="811" height="944" alt="Image" src="https://github.com/user-attachments/assets/1cd9f621-fca3-4ce5-b031-52f95979ebd4" /> <img width="448" height="869" alt="Image" src="https://github.com/user-attachments/assets/5b6a6273-90d1-4f9c-8459-cfd4ee2eb250" /> <img width="923" height="609" alt="Image" src="https://github.com/user-attachments/assets/2039bbda-79d3-4283-b566-d65163766f5d" /> <img width="883" height="1292" alt="Image" src="https://github.com/user-attachments/assets/3098a623-4fb3-41d0-a577-4e6f74baa14f" /> ### Operating System MACOS 26.2 ### Terminal Warp Terminal
yindo added the bug label 2026-02-16 17:40:38 -05:00
yindo closed this issue 2026-02-16 17:40:38 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 15, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4990: Output from agent is frequently hidden - similar symptoms of unexpected agent output behavior
  • #3241: Opencode stuck in Plan mode - agent behaving unexpectedly with output issues
  • #2512: Opencode stuck in "generating" - agent unresponsiveness and garbled behavior
  • #4943: github copilot: gpt-5-mini not supported via responses api - Copilot model-related issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 15, 2025): This issue might be a duplicate of existing issues. Please check: - #4990: Output from agent is frequently hidden - similar symptoms of unexpected agent output behavior - #3241: Opencode stuck in Plan mode - agent behaving unexpectedly with output issues - #2512: Opencode stuck in "generating" - agent unresponsiveness and garbled behavior - #4943: github copilot: gpt-5-mini not supported via responses api - Copilot model-related issues Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 15, 2025):

what the

@rekram1-node commented on GitHub (Dec 15, 2025): what the
Author
Owner

@rekram1-node commented on GitHub (Dec 15, 2025):

is there anything in your repo or AGENTS.md files that could trigger this? Never seen b4

@rekram1-node commented on GitHub (Dec 15, 2025): is there anything in your repo or AGENTS.md files that could trigger this? Never seen b4
Author
Owner

@tebayoso commented on GitHub (Dec 15, 2025):

The agents.MD is there:

at AGENTS.md 
# Repository Guidelines

## Project Structure & Module Organization
Core services live in dedicated directories: `NI-MWAPI/` (Rails API), `NI-CMS/` (Laravel CMS), `NI-WebsiteFrontend/` (Next.js web), `NI-CMS-FE/` (Next.js admin), `frameflow-reader/` (React reader), `signer/` (Vue auth), and `NI-klecks/` (TypeScript art tool). Shared infrastructure lives in `NI-Infrastructure/`, database assets in `database/` and `supabase/`, and automation scripts in `scripts/`. Documentation and architecture references are under `docs/`. Keep service-specific assets and tests inside each service directory (`spec/`, `tests/`, or `__tests__/` as appropriate).

## Build, Test, and Development Commands
Run `./scripts/setup.sh` once to bootstrap local dependencies. Use `./scripts/dev/docker-start.sh` to start the full stack and `./scripts/dev/docker-stop.sh` to shut it down. For targeted work, `docker-compose -f ni-docker-compose.yml up -d ni-mwapi ni-cms` brings up API and CMS only. Tail logs with `docker-compose -f ni-docker-compose.yml logs -f <service>`. Rails console access: `docker exec -it ni-mwapi rails console`.

## Coding Style & Naming Conventions
Follow language defaults: 2-space indent for Ruby, PSR-12 for PHP, and 2-space indent with semicolons omitted for TypeScript/JavaScript. Rails code should pass `docker exec ni-mwapi bundle exec rubocop`; Laravel code should pass `docker exec ni-cms ./vendor/bin/pint`; front-end projects must satisfy `npm run lint` and `npm run format` where available. Use PascalCase for React/Vue components, camelCase for variables, and snake_case for database columns and Rails models (`SeriesIssue` => `series_issues`).

## Testing Guidelines
Rails specs run via `docker exec ni-mwapi bundle exec rspec`; enable coverage with `COVERAGE=true` for pipeline parity. Laravel tests run with `docker exec ni-cms php artisan test`. Front-end suites rely on Vitest or Jest; run `npm test` inside `frameflow-reader/`, `signer/`, or `NI-WebsiteFrontend/`. Name tests `_spec.rb`, `*Test.php`, or `*.test.ts[x]` to match existing suites. Commit only when all relevant tests pass locally.

## Commit & Pull Request Guidelines
Git history favors concise, imperative subjects (`chore: update docker-compose configuration`). Use Conventional Commit prefixes (`feat`, `fix`, `chore`, `docs`, `refactor`, `test`) plus an optional scope. Reference issue IDs where applicable (`feat(auth): add magic link expiry check`). PRs must include: summary of changes, impacted services, local test evidence, env variables touched, and screenshots for UI updates. Link to relevant docs in `docs/` when adding or altering architecture.

## Environment & Security Notes
Copy `.env.ni-docker` to `.env.ni-docker.local` and keep secrets out of version control. Stripe, Supabase, and Customer.io keys are required for end-to-end flows; use sandbox credentials only. Never commit real production keys or database dumps—store them in the secrets manager referenced in `NI-Infrastructure/`.
@tebayoso commented on GitHub (Dec 15, 2025): The agents.MD is there: ``` at AGENTS.md # Repository Guidelines ## Project Structure & Module Organization Core services live in dedicated directories: `NI-MWAPI/` (Rails API), `NI-CMS/` (Laravel CMS), `NI-WebsiteFrontend/` (Next.js web), `NI-CMS-FE/` (Next.js admin), `frameflow-reader/` (React reader), `signer/` (Vue auth), and `NI-klecks/` (TypeScript art tool). Shared infrastructure lives in `NI-Infrastructure/`, database assets in `database/` and `supabase/`, and automation scripts in `scripts/`. Documentation and architecture references are under `docs/`. Keep service-specific assets and tests inside each service directory (`spec/`, `tests/`, or `__tests__/` as appropriate). ## Build, Test, and Development Commands Run `./scripts/setup.sh` once to bootstrap local dependencies. Use `./scripts/dev/docker-start.sh` to start the full stack and `./scripts/dev/docker-stop.sh` to shut it down. For targeted work, `docker-compose -f ni-docker-compose.yml up -d ni-mwapi ni-cms` brings up API and CMS only. Tail logs with `docker-compose -f ni-docker-compose.yml logs -f <service>`. Rails console access: `docker exec -it ni-mwapi rails console`. ## Coding Style & Naming Conventions Follow language defaults: 2-space indent for Ruby, PSR-12 for PHP, and 2-space indent with semicolons omitted for TypeScript/JavaScript. Rails code should pass `docker exec ni-mwapi bundle exec rubocop`; Laravel code should pass `docker exec ni-cms ./vendor/bin/pint`; front-end projects must satisfy `npm run lint` and `npm run format` where available. Use PascalCase for React/Vue components, camelCase for variables, and snake_case for database columns and Rails models (`SeriesIssue` => `series_issues`). ## Testing Guidelines Rails specs run via `docker exec ni-mwapi bundle exec rspec`; enable coverage with `COVERAGE=true` for pipeline parity. Laravel tests run with `docker exec ni-cms php artisan test`. Front-end suites rely on Vitest or Jest; run `npm test` inside `frameflow-reader/`, `signer/`, or `NI-WebsiteFrontend/`. Name tests `_spec.rb`, `*Test.php`, or `*.test.ts[x]` to match existing suites. Commit only when all relevant tests pass locally. ## Commit & Pull Request Guidelines Git history favors concise, imperative subjects (`chore: update docker-compose configuration`). Use Conventional Commit prefixes (`feat`, `fix`, `chore`, `docs`, `refactor`, `test`) plus an optional scope. Reference issue IDs where applicable (`feat(auth): add magic link expiry check`). PRs must include: summary of changes, impacted services, local test evidence, env variables touched, and screenshots for UI updates. Link to relevant docs in `docs/` when adding or altering architecture. ## Environment & Security Notes Copy `.env.ni-docker` to `.env.ni-docker.local` and keep secrets out of version control. Stripe, Supabase, and Customer.io keys are required for end-to-end flows; use sandbox credentials only. Never commit real production keys or database dumps—store them in the secrets manager referenced in `NI-Infrastructure/`. ```
Author
Owner

@tebayoso commented on GitHub (Dec 15, 2025):

This one has a good clue @rekram1-node as the agent itself notices that the response is gibberished and apoligizes, lmk what can I provide.

Edit: Looks like this happens during the automcompacts!

Image
@tebayoso commented on GitHub (Dec 15, 2025): This one has a good clue @rekram1-node as the agent itself notices that the response is gibberished and apoligizes, lmk what can I provide. Edit: Looks like this happens during the automcompacts! <img width="1128" height="267" alt="Image" src="https://github.com/user-attachments/assets/712a6678-85d8-412a-92cb-7ae738e9cade" />
Author
Owner

@rekram1-node commented on GitHub (Dec 15, 2025):

what is that http:www.coutesy and link:... stuff? Is that the output of some tool?

@rekram1-node commented on GitHub (Dec 15, 2025): what is that http:www.coutesy and link:... stuff? Is that the output of some tool?
Author
Owner

@tebayoso commented on GitHub (Dec 15, 2025):

That's what opencode outputs when performing the compacting process. I just starts showing this random outputs. And that's not on my files anywhere. If I quit the agent with ctrl+c, when I get back to the session all those outputs are nowhere to be found in the history.

@tebayoso commented on GitHub (Dec 15, 2025): That's what opencode outputs when performing the compacting process. I just starts showing this random outputs. And that's not on my files anywhere. If I quit the agent with ctrl+c, when I get back to the session all those outputs are nowhere to be found in the history.
Author
Owner

@rekram1-node commented on GitHub (Dec 15, 2025):

This is so weird. Anyway you can do: opencode export > session.json for me?

@rekram1-node commented on GitHub (Dec 15, 2025): This is so weird. Anyway you can do: `opencode export > session.json` for me?
Author
Owner

@tebayoso commented on GitHub (Dec 15, 2025):

This is only the relevant message, the previous one and the next one after this one are my user messages:

https://gist.github.com/tebayoso/4210322e381229ae96291ff34e1c8c9d

@tebayoso commented on GitHub (Dec 15, 2025): This is only the relevant message, the previous one and the next one after this one are my user messages: https://gist.github.com/tebayoso/4210322e381229ae96291ff34e1c8c9d
Author
Owner

@rekram1-node commented on GitHub (Dec 15, 2025):

Prolly would need entire session since it would have some helpful metadata for debugging potentially, also opencode debug config output too.

I think this is something w/ your setup so im trying to figure out what, nobody else has reported this

@rekram1-node commented on GitHub (Dec 15, 2025): Prolly would need entire session since it would have some helpful metadata for debugging potentially, also `opencode debug config` output too. I think this is something w/ your setup so im trying to figure out what, nobody else has reported this
Author
Owner

@tebayoso commented on GitHub (Dec 19, 2025):

It didn't happen again, I'm blaming copilot API provider for the problem. Thanks,

@tebayoso commented on GitHub (Dec 19, 2025): It didn't happen again, I'm blaming copilot API provider for the problem. Thanks,
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3555