Skip to content

CLAUDE-CODE in Linux not using the openfang workspace and settings AT ALL #672

@apestchanker

Description

@apestchanker

Description

I am trying to use CLAUDE-CODE with OAUTH so I can try openfang with not much costs. But it seems that using the local claude-code install, generates that the claude agent does not know anything about openfang, nor it uses the .md files, nor the workspace, nor the API.. so I have to teach it from zero and even though he keeps missing the context. Does anyone experimented this? There is a caveat on my environment that could be adding extra complexity to it, as I am running in a termux on android, so standard things such as using /tmp are not allowed. But I did manage to use a TMPDIR in the openfang workspace, the thing with CLAUDE-CODE is seems not to be using the openfang environment all the time. Main issue now, is the twitter-hand that create the tweets, write them in the json file (after a while I was able to make it write in the twitter-hand workspace) but it does not send those tweets to the API for my review and approval, it asks me to read the .json and edit it by hand... very frustrating. I will try later with standard API models, but I think having able to use claude-code is great for familiarizing with openfang and for many general tasks.. If I can upload any piece of config or log for you guys to undersand this better, please let me know.

Expected Behavior

Claude-Code provider to automatically understand and use openfang configuration, context and workspace.

Steps to Reproduce

1 Run openfang start
2 Configure claude-code with oauth (local claude install and oauth token config)
3 Spawn twitter-hand
4 validate twitter-hand workspace is up and all the files are there
5 See that twitter-hand does not generate anything on the approvals dashboard

OpenFang Version

0.4.4

Operating System

Linux (aarch64/ARM64)

Logs / Screenshots

~/openfang $ tail -n 100 openfang.log
2026-03-16T13:53:21.647505Z INFO openfang_kernel::kernel: Agent recovered successfully — resetting recovery tracker agent=assistant
2026-03-16T13:53:24.503134Z INFO openfang_channels::discord: Discord gateway closed by server
2026-03-16T13:53:24.503361Z WARN openfang_channels::discord: Discord: reconnecting in 1s
2026-03-16T13:53:25.505844Z INFO openfang_channels::discord: Connecting to Discord gateway...
2026-03-16T13:53:25.924581Z INFO openfang_channels::discord: Discord gateway connected
2026-03-16T13:53:25.925102Z INFO openfang_channels::discord: Discord: sending RESUME (session=5489248f6872ac942cac509ea6fca0c4)
2026-03-16T13:53:26.129964Z INFO openfang_channels::discord: Discord session resumed successfully
2026-03-16T13:53:51.724614Z INFO openfang_kernel::kernel: Pre-emptive compaction before LLM call agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9 messages=32 estimated_tokens=7843
2026-03-16T13:53:51.725020Z WARN openfang_runtime::drivers::claude_code: Claude Code driver: --dangerously-skip-permissions enabled. The CLI will not prompt for tool approvals. OpenFang's own capability/RBAC system enforces access control.
2026-03-16T13:53:51.725086Z INFO openfang_runtime::compactor: Compacting session messages total=32 compacting=22 keeping=10
2026-03-16T13:54:10.635324Z INFO openfang_runtime::drivers::claude_code: Claude Code CLI subprocess completed successfully model=haiku
2026-03-16T13:54:10.635649Z INFO openfang_runtime::compactor: Session compaction complete (single-pass) summary_len=1265 compacted=22
2026-03-16T13:54:10.640860Z INFO openfang_kernel::kernel: Compacted 22 messages into summary (1265 chars), kept 10 recent messages. Post-audit: clean. agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9
2026-03-16T13:54:10.642540Z INFO openfang_kernel::kernel: Tools selected for LLM request agent=twitter-hand agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9 tool_count=15 tool_names=["file_read", "file_write", "file_list", "web_fetch", "web_search", "shell_exec", "memory_store", "memory_recall", "event_publish", "schedule_create", "schedule_list", "schedule_delete", "knowledge_add_entity", "knowledge_add_relation", "knowledge_query"]
2026-03-16T13:54:10.647618Z WARN openfang_runtime::drivers::claude_code: Claude Code driver: --dangerously-skip-permissions enabled. The CLI will not prompt for tool approvals. OpenFang's own capability/RBAC system enforces access control.
2026-03-16T13:54:10.648535Z INFO openfang_runtime::agent_loop: Starting agent loop agent=twitter-hand
2026-03-16T13:54:10.655257Z WARN openfang_runtime::agent_loop: Embedding recall failed, falling back to text search: HTTP error: error sending request for url (http://localhost:11434/v1/embeddings)
2026-03-16T13:54:14.970382Z INFO openfang_api::middleware: API request request_id=6642836a-69cd-4acc-8ad0-5e5fe0ea1302 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:54:14.971494Z INFO openfang_api::middleware: API request request_id=bb940e95-efa5-43cd-882b-ed0fe3741b33 method=GET path=/api/providers status=200 latency_ms=1
2026-03-16T13:54:14.972030Z INFO openfang_api::middleware: API request request_id=7ddaaa37-48df-4953-9344-c6158abce423 method=GET path=/api/audit/recent status=200 latency_ms=0
2026-03-16T13:54:14.970376Z INFO openfang_api::middleware: API request request_id=2b8ae966-7397-4816-b143-2b59205b5dd1 method=GET path=/api/usage status=200 latency_ms=0
2026-03-16T13:54:14.973138Z INFO openfang_api::middleware: API request request_id=7808a960-c164-49c2-abe7-33e6749cdcd0 method=GET path=/api/health status=200 latency_ms=1
2026-03-16T13:54:14.981677Z INFO openfang_api::middleware: API request request_id=bf3f84d3-8116-4055-a33d-cdcc9c6c2649 method=GET path=/api/channels status=200 latency_ms=10
2026-03-16T13:54:14.983555Z INFO openfang_api::middleware: API request request_id=0f0159af-a507-448a-bbac-d5a909c76b20 method=GET path=/api/skills status=200 latency_ms=0
2026-03-16T13:54:14.983732Z INFO openfang_api::middleware: API request request_id=71047fe7-155f-4ec3-8fc1-71b944e9f964 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:54:14.984245Z INFO openfang_api::middleware: API request request_id=102c7838-04ad-491e-822a-c3cc22ced2be method=GET path=/api/mcp/servers status=200 latency_ms=0
2026-03-16T13:54:14.984431Z INFO openfang_api::middleware: API request request_id=0083ff5f-fd89-438c-9cb5-843173e150ff method=GET path=/api/agents status=200 latency_ms=0
2026-03-16T13:54:21.647817Z WARN openfang_kernel::heartbeat: Agent is unresponsive agent=twitter-hand inactive_secs=67 timeout_secs=60
2026-03-16T13:54:21.648232Z WARN openfang_kernel::kernel: Unresponsive Running agent marked as Crashed for recovery agent=twitter-hand inactive_secs=67
2026-03-16T13:54:26.340586Z INFO openfang_channels::discord: Discord gateway closed by server
2026-03-16T13:54:26.340977Z WARN openfang_channels::discord: Discord: reconnecting in 1s
2026-03-16T13:54:27.345093Z INFO openfang_channels::discord: Connecting to Discord gateway...
2026-03-16T13:54:27.612078Z INFO openfang_channels::discord: Discord gateway connected
2026-03-16T13:54:27.612357Z INFO openfang_channels::discord: Discord: sending RESUME (session=5489248f6872ac942cac509ea6fca0c4)
2026-03-16T13:54:27.755039Z INFO openfang_channels::discord: Discord session resumed successfully
2026-03-16T13:54:28.339960Z INFO openfang_runtime::drivers::claude_code: Claude Code CLI subprocess completed successfully model=haiku
2026-03-16T13:54:51.729696Z INFO openfang_kernel::kernel: Tools selected for LLM request agent=twitter-hand agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9 tool_count=15 tool_names=["file_read", "file_write", "file_list", "web_fetch", "web_search", "shell_exec", "memory_store", "memory_recall", "event_publish", "schedule_create", "schedule_list", "schedule_delete", "knowledge_add_entity", "knowledge_add_relation", "knowledge_query"]
2026-03-16T13:54:51.740372Z WARN openfang_runtime::drivers::claude_code: Claude Code driver: --dangerously-skip-permissions enabled. The CLI will not prompt for tool approvals. OpenFang's own capability/RBAC system enforces access control.
2026-03-16T13:54:51.741877Z INFO openfang_runtime::agent_loop: Starting agent loop agent=twitter-hand
2026-03-16T13:54:51.751890Z WARN openfang_runtime::agent_loop: Embedding recall failed, falling back to text search: HTTP error: error sending request for url (http://localhost:11434/v1/embeddings)
2026-03-16T13:55:12.537055Z INFO openfang_runtime::drivers::claude_code: Claude Code CLI subprocess completed successfully model=haiku
2026-03-16T13:55:14.985656Z INFO openfang_api::middleware: API request request_id=a5948bfa-abf0-4433-be06-c351cb90c207 method=GET path=/api/audit/recent status=200 latency_ms=1
2026-03-16T13:55:14.989570Z INFO openfang_api::middleware: API request request_id=0797aa44-4bfc-4b80-b8fc-1671a05b5413 method=GET path=/api/health status=200 latency_ms=1
2026-03-16T13:55:14.990286Z INFO openfang_api::middleware: API request request_id=aed7a5c6-0f79-48e0-b3c9-d53b30d271ed method=GET path=/api/usage status=200 latency_ms=0
2026-03-16T13:55:14.990422Z INFO openfang_api::middleware: API request request_id=9e182dbd-c48d-4376-b34a-dbd0a8bbad39 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:55:14.996022Z INFO openfang_api::middleware: API request request_id=24328929-15ce-4b78-a5e9-c0457e8da659 method=GET path=/api/mcp/servers status=200 latency_ms=0
2026-03-16T13:55:14.999893Z INFO openfang_api::middleware: API request request_id=6441102a-32ab-47f7-a512-725ed6430020 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:55:15.001088Z INFO openfang_api::middleware: API request request_id=e4230e26-e056-4d95-b379-6720d07fbc9e method=GET path=/api/skills status=200 latency_ms=0
2026-03-16T13:55:15.002824Z INFO openfang_api::middleware: API request request_id=d39ec646-9c2b-47e9-9dc4-41c7a1387d22 method=GET path=/api/agents status=200 latency_ms=0
2026-03-16T13:55:15.006803Z INFO openfang_api::middleware: API request request_id=37767f86-4861-4303-acc3-e1d012a03ceb method=GET path=/api/providers status=200 latency_ms=16
2026-03-16T13:55:15.008354Z INFO openfang_api::middleware: API request request_id=56312deb-964f-438c-b0a6-be262bf794f3 method=GET path=/api/channels status=200 latency_ms=23
2026-03-16T13:55:28.204778Z INFO openfang_channels::discord: Discord gateway closed by server
2026-03-16T13:55:28.205014Z WARN openfang_channels::discord: Discord: reconnecting in 1s
2026-03-16T13:55:29.209851Z INFO openfang_channels::discord: Connecting to Discord gateway...
2026-03-16T13:55:29.521215Z INFO openfang_channels::discord: Discord gateway connected
2026-03-16T13:55:29.521585Z INFO openfang_channels::discord: Discord: sending RESUME (session=5489248f6872ac942cac509ea6fca0c4)
2026-03-16T13:55:29.725590Z INFO openfang_channels::discord: Discord session resumed successfully
2026-03-16T13:55:51.731498Z INFO openfang_kernel::kernel: Tools selected for LLM request agent=twitter-hand agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9 tool_count=15 tool_names=["file_read", "file_write", "file_list", "web_fetch", "web_search", "shell_exec", "memory_store", "memory_recall", "event_publish", "schedule_create", "schedule_list", "schedule_delete", "knowledge_add_entity", "knowledge_add_relation", "knowledge_query"]
2026-03-16T13:55:51.740709Z WARN openfang_runtime::drivers::claude_code: Claude Code driver: --dangerously-skip-permissions enabled. The CLI will not prompt for tool approvals. OpenFang's own capability/RBAC system enforces access control.
2026-03-16T13:55:51.742369Z INFO openfang_runtime::agent_loop: Starting agent loop agent=twitter-hand
2026-03-16T13:55:51.753157Z WARN openfang_runtime::agent_loop: Embedding recall failed, falling back to text search: HTTP error: error sending request for url (http://localhost:11434/v1/embeddings)
2026-03-16T13:56:12.451218Z INFO openfang_runtime::drivers::claude_code: Claude Code CLI subprocess completed successfully model=haiku
2026-03-16T13:56:15.002583Z INFO openfang_api::middleware: API request request_id=39f05556-ee56-41f3-b6cd-2823e82d3817 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:56:15.004088Z INFO openfang_api::middleware: API request request_id=b75a4837-bfee-4ab8-837c-c28a9941732e method=GET path=/api/health status=200 latency_ms=2
2026-03-16T13:56:15.005521Z INFO openfang_api::middleware: API request request_id=e6a594f8-e7cd-48b0-be19-297a08b07508 method=GET path=/api/usage status=200 latency_ms=0
2026-03-16T13:56:15.005976Z INFO openfang_api::middleware: API request request_id=2c7611fe-8a18-4975-b746-547fdd4579b9 method=GET path=/api/audit/recent status=200 latency_ms=0
2026-03-16T13:56:15.017399Z INFO openfang_api::middleware: API request request_id=825c0183-4a58-4e4c-9188-c4c483c3f298 method=GET path=/api/mcp/servers status=200 latency_ms=0
2026-03-16T13:56:15.021677Z INFO openfang_api::middleware: API request request_id=2e89489e-484b-4ba6-9343-9468f66bc31c method=GET path=/api/skills status=200 latency_ms=0
2026-03-16T13:56:15.022087Z INFO openfang_api::middleware: API request request_id=9fbabdc5-17ec-4013-95ef-c6095c713e46 method=GET path=/api/channels status=200 latency_ms=19
2026-03-16T13:56:15.022582Z INFO openfang_api::middleware: API request request_id=62407984-35ee-4d07-aafb-4f1084010078 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:56:15.023562Z INFO openfang_api::middleware: API request request_id=30f1ccae-a9f0-438a-964e-d85a576a55bc method=GET path=/api/providers status=200 latency_ms=17
2026-03-16T13:56:15.023669Z INFO openfang_api::middleware: API request request_id=f2b2985f-f39d-4f52-9343-a7957dd0c3ed method=GET path=/api/agents status=200 latency_ms=0
2026-03-16T13:56:21.646954Z WARN openfang_kernel::heartbeat: Agent is unresponsive agent=assistant inactive_secs=209 timeout_secs=180
2026-03-16T13:56:21.647425Z WARN openfang_kernel::kernel: Unresponsive Running agent marked as Crashed for recovery agent=assistant inactive_secs=209
2026-03-16T13:56:30.052240Z INFO openfang_channels::discord: Discord gateway closed by server
2026-03-16T13:56:30.052457Z WARN openfang_channels::discord: Discord: reconnecting in 1s
2026-03-16T13:56:31.057241Z INFO openfang_channels::discord: Connecting to Discord gateway...
2026-03-16T13:56:31.371683Z INFO openfang_channels::discord: Discord gateway connected
2026-03-16T13:56:31.371958Z INFO openfang_channels::discord: Discord: sending RESUME (session=5489248f6872ac942cac509ea6fca0c4)
2026-03-16T13:56:31.574364Z INFO openfang_channels::discord: Discord session resumed successfully
2026-03-16T13:56:51.647637Z WARN openfang_kernel::heartbeat: Agent is crashed — eligible for recovery agent=assistant inactive_secs=29
2026-03-16T13:56:51.648066Z INFO openfang_kernel::kernel: Auto-recovering crashed agent (attempt 1/3) agent=assistant attempt=1 max=3
2026-03-16T13:56:51.734561Z INFO openfang_kernel::kernel: Tools selected for LLM request agent=twitter-hand agent_id=73b2b4ae-dffa-5cff-a473-06a455c53da9 tool_count=15 tool_names=["file_read", "file_write", "file_list", "web_fetch", "web_search", "shell_exec", "memory_store", "memory_recall", "event_publish", "schedule_create", "schedule_list", "schedule_delete", "knowledge_add_entity", "knowledge_add_relation", "knowledge_query"]
2026-03-16T13:56:51.744957Z WARN openfang_runtime::drivers::claude_code: Claude Code driver: --dangerously-skip-permissions enabled. The CLI will not prompt for tool approvals. OpenFang's own capability/RBAC system enforces access control.
2026-03-16T13:56:51.746418Z INFO openfang_runtime::agent_loop: Starting agent loop agent=twitter-hand
2026-03-16T13:56:51.757229Z WARN openfang_runtime::agent_loop: Embedding recall failed, falling back to text search: HTTP error: error sending request for url (http://localhost:11434/v1/embeddings)
2026-03-16T13:57:14.925234Z INFO openfang_api::middleware: API request request_id=a3baa2f2-a5b5-4a50-8e53-9630f653e84a method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:57:14.928563Z INFO openfang_api::middleware: API request request_id=88f48456-879f-4bc9-b0e6-7c8fc14ce9da method=GET path=/api/usage status=200 latency_ms=0
2026-03-16T13:57:14.929624Z INFO openfang_api::middleware: API request request_id=5fccb606-8be3-4b50-8ade-6b87482ef6e5 method=GET path=/api/audit/recent status=200 latency_ms=0
2026-03-16T13:57:14.930905Z INFO openfang_api::middleware: API request request_id=99cadea7-04a0-471d-b38b-f799a9c3ec14 method=GET path=/api/providers status=200 latency_ms=2
2026-03-16T13:57:14.931903Z INFO openfang_api::middleware: API request request_id=891073fd-d962-4642-a339-f0a746d59733 method=GET path=/api/health status=200 latency_ms=4
2026-03-16T13:57:14.940506Z INFO openfang_api::middleware: API request request_id=a59dd7e8-4287-4e1a-938f-e10e33de6c1c method=GET path=/api/mcp/servers status=200 latency_ms=0
2026-03-16T13:57:14.941075Z INFO openfang_api::middleware: API request request_id=d6c924ea-0335-476d-b8e4-24835bbbfe77 method=GET path=/api/status status=200 latency_ms=0
2026-03-16T13:57:14.941409Z INFO openfang_api::middleware: API request request_id=dbb09024-b3f7-4bee-b03a-c6a88012a4cb method=GET path=/api/skills status=200 latency_ms=0
2026-03-16T13:57:14.943817Z INFO openfang_api::middleware: API request request_id=10d46aaa-b5ce-45b3-9552-8aec790ec78a method=GET path=/api/channels status=200 latency_ms=16
2026-03-16T13:57:14.943831Z INFO openfang_api::middleware: API request request_id=b9583881-fcd1-4e95-b605-99b87be03dde method=GET path=/api/agents status=200 latency_ms=0
2026-03-16T13:57:17.698969Z INFO openfang_runtime::drivers::claude_code: Claude Code CLI subprocess completed successfully model=haiku
2026-03-16T13:57:17.708570Z WARN openfang_runtime::agent_loop: Embedding for remember failed: HTTP error: error sending request for url (http://localhost:11434/v1/embeddings)
2026-03-16T13:57:17.711110Z INFO openfang_runtime::agent_loop: Agent loop completed agent=twitter-hand iterations=1 tokens=1377
2026-03-16T13:57:21.647865Z INFO openfang_kernel::kernel: Agent recovered successfully — resetting recovery tracker agent=assistant

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions